Subject: | Odd behaviour on specific date/time |
Date: | Mon, 05 Oct 2015 11:26:58 +0000 |
To: | bug-Date-Manip [...] rt.cpan.org |
From: | Dominic Arkwright <dja [...] domi.co.uk> |
Hi
I'm using Date::Manip to go through data from a provider and I'm converting
the variable date formats into something standard for further processing.
This command illustrates the problem:
perl -e 'use Date::Manip; print UnixDate("2013-03-31 02:00:00",
"%Y-%m-%d");'
This returns an empty string. On the other hand
perl -e 'use Date::Manip; print UnixDate("2013-03-30 02:00:00",
"%Y-%m-%d");'
perl -e 'use Date::Manip; print UnixDate("2013-03-31 01:00:00",
"%Y-%m-%d");'
perl -e 'use Date::Manip; print UnixDate("2013-03-31 03:00:00",
"%Y-%m-%d");'
all return what you'd expect. Every combination I've tried of 2013-03-31
02:xx:xx returns empty and every combination that *isn't* 2am-something on
2013-03-31 returns what you'd expect.
I can't explain it; I was hoping you could!
Cheers