|Subject:||Date::Parse unable to set seconds correctly?|
|Date:||Fri, 24 Jul 2009 16:54:26 +0200|
|To:||bug-TimeDate [...] rt.cpan.org|
|From:||"Frédéric Buclin" <lpsolit [...] gmail.com>|
While debugging Bugzilla, I found something weird with Date::Parse::strptime() version 2.27. # perl -MDate::Parse -we 'my @a = strptime("2008.11.30 22:35 CET"); print join(":", @a);' It returns: 0:35:22:30:10:108:3600. But if you write: perl -MDate::Parse -we 'my @a = strptime("2008-11-30 22:35 CET"); print join(":", @a);' It returns: Use of uninitialized value $a in join or string at -e line 1. :35:22:30:10:108:3600 Note that seconds are undefined in this last case, despite the date is basically the same (I only replaced dots by dashes). This triggers crashes in places where no undefined values are expected.