Subject: | using %H instead of %l with %p leads to silent failure |
This works:
DB<20> p $f = DateTime::Format::Strptime->new(pattern => "%Y-%m-%d %l:%M %p", time_zone => 'Europe/Berlin' )->parse_datetime("2014-01-24 2:20 PM")
2014-01-24T14:20:00
This is pretty surprising, actually, to begin with, because for the hours I have %l (that's a lower case L as in Lima). Not documented! Anyway, works with %I (as in India) also.
This doesn't:
DB<25> p $f = DateTime::Format::Strptime->new(pattern => "%Y-%m-%d %H:%M %p",
time_zone => 'Europe/Berlin' )->parse_datetime("2014-01-24 2:20 PM")
Silent failure, here, seems like a bummer. I realize that "23:01 AM" would be nonsensical, but… maybe a warning? I dunno.
--
rjbs