While testing, I am experiencing an error anytime I try and convert from America/Chicago to some other timezone on April 3rd at anytime during the 2:00 am hour (the hour we "spring forward").

I am running on Windows XP using ActiveState Perl 5.8.6. Code sample below. Has anyone else seen this error?

Rick
+++
#!perl

use DateTime;
use DateTime::TimeZone;

my $source = DateTime->new(year => 2005, month => 4, day => 3,
hour => 02, minute => 00,
time_zone => 'America/Chicago');
my $result = $source->clone()
->set_time_zone( 'Europe/Paris' );
print $source->strftime("%F %r %Z"), " became ",
$result->strftime("%F %r %Z"), "\n";
# Should print 2005-04-03 02:00:00 AM CDT became 2005-04-03 10:00:00 AM CEST
# However, it aborts with:
# Invalid local time for date in time zone: America/Chicago




Reply via email to