Skip Menu |

This queue is for tickets about the TimeDate CPAN distribution.

Report information
The Basics
Id: 57800
Status: open
Priority: 0/
Queue: TimeDate

Owner: Nobody in particular
Requestors: ts862m [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Date::Parse bug
Date: Mon, 24 May 2010 12:57:10 -0400
To: <bug-TimeDate [...]>
From: "SCHMALZRIED, TERRY (ATTLABS)" <ts862m [...]>
Download (untitled) / with headers
text/plain 1.4k
Found a date that str2time() in TimeDate-1.20 > Date::Parse is not parsing correctly (but that strptime() does parse correctly). Output, code, and environment below: $ str2time: Day too big - 32993 > 24854 Sec too small - 32993 < 74752 str2time returned undef upon failure to parse '5/1/1960' strptime: strptime returned ',,,1,4,60,' from parsing '5/1/1960' $ cat #!/usr/bin/perl use Date::Parse; $date = "5/1/1960"; print "\nstr2time:\n"; $val = str2time($date); if (!defined($val)) { print STDERR "str2time returned undef upon failure to parse '$date'\n"; } print "\nstrptime:\n"; @parts = strptime($date); if ($#parts < 0) { print STDERR "strptime returned empty array upon failure to parse '$date'\n"; } else { ($ss,$mm,$hh,$day,$month,$year,$zone) = @parts; print "strptime returned '$ss,$mm,$hh,$day,$month,$year,$zone' from parsing '$date'\n"; } $ /usr/bin/perl -v This is perl, v5.8.8 built for i386-linux-thread-multi Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at, the Perl Home Page. $ uname -a Linux mtndbic01 2.6.18-128.el5 #1 SMP Wed Dec 17 11:42:39 EST 2008 i686 i686 i386 GNU/Linux mtndbic01:/home/ts862m/bin>

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to