Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-Format-Strptime CPAN distribution.

Report information
The Basics
Id: 11863
Status: resolved
Priority: 0/
Queue: DateTime-Format-Strptime

Owner: rickm [...]
Requestors: DSimonetta [...]

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

Subject: bug in DateTime::Format::Strptime 1.0601 when using %s
Date: Mon, 14 Mar 2005 08:52:03 -0000
From: "Don Simonetta" <DSimonetta [...]>
To: <bug-datetime-format-strptime [...]>
Download (untitled) / with headers
text/plain 703b
There is a bug in this module when dealing with seconds since epoch. The following piece of code, when run, illustrates the problem. It appears that the minutes & seconds of the final result are always set to 0. use strict; use DateTime::Format::Strptime; my $iDt = time; my $Strp = new DateTime::Format::Strptime(pattern => '%s'); my $dt = $Strp->parse_datetime($iDt); print "converted $iDt to " . DateTime::Format::Strptime::strftime("%Y-%m-%d %H:%M:%S", $dt) . "\n"; my($sec,$min,$hour,$mday,$month,$year); ($sec,$min,$hour,$mday,$month,$year,undef) = localtime($iDt); printf("Instead of %4d-%02d-%02d %02d:%02d:%02d \n", $year+1900, $month+1, $mday, $hour, $min, $sec);
Download (untitled) / with headers
text/plain 126b
Resolved in 1.0900. In future, please log bugs in the google-code project:

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

Please report any issues with to