Subject: | Bug with strptime/strftime |
use Time::Piece;
my $tp = Time::Piece->strptime("2002-01-01", "%Y-%m-%d");
printf "%s = %s = %s\n", $tp, $tp->strftime, $tp->strftime("%A");
This prints:
Use of uninitialized value in subroutine entry at /usr/local/lib/perl/5.8.0/Time/Piece.pm line 397.
Use of uninitialized value in subroutine entry at /usr/local/lib/perl/5.8.0/Time/Piece.pm line 397.
Use of uninitialized value in subroutine entry at /usr/local/lib/perl/5.8.0/Time/Piece.pm line 397.
Use of uninitialized value in subroutine entry at /usr/local/lib/perl/5.8.0/Time/Piece.pm line 397.
Use of uninitialized value in subroutine entry at /usr/local/lib/perl/5.8.0/Time/Piece.pm line 397.
Use of uninitialized value in subroutine entry at /usr/local/lib/perl/5.8.0/Time/Piece.pm line 397.
Tue Jan 1 00:00:00 2002 = Sun, 01 Jan 2002 00:00:00 GMT = Sunday
A Tuesday has become a Sunday ... which is not good...
Tony