Difference Between America/New_York and EST5EDT When Converting Pre-Time-Zone Times

[email protected] (Jim Monty)
Newsgroups perl.datetime
Message-ID <[email protected]>
I can plainly see that DateTime/TimeZone/America/New_York.pm is not identical to DateTime/TimeZone/EST5EDT.pm, but I don't fully understand what's going on in the following example or why, exactly, the results should differ:
 
 
C:\Perl\site\lib\DateTime\TimeZone>ls -o EST5EDT.pm America/New_York.pm
-r-xr-xr-a   1 CTECFTS\MontyJ     19264 Jan 21 12:47 America/New_York.pm
-r-xr-xr-a   1 CTECFTS\MontyJ     11083 Jan 21 12:47 EST5EDT.pm
 
C:\Perl\site\lib\DateTime\TimeZone>perl -MDateTime::Format::ISO8601 -le "$dt1 = DateTime::Format::ISO8601->parse_datetime('1600-12-31T16:00:00.000-08:00'); my $dt2 = $dt1->clone()->set_time_zone('America/New_York'); print $dt2->format_cldr('yyyy-MM-ddTHH:mm:ss.SSSZ');"
1600-12-31T19:03:58.000-045602
 
C:\Perl\site\lib\DateTime\TimeZone>perl -MDateTime::Format::ISO8601 -le "$dt1 = DateTime::Format::ISO8601->parse_datetime('1600-12-31T16:00:00.000-08:00'); my $dt2 = $dt1->clone()->set_time_zone('EST5EDT'); print $dt2->format_cldr('yyyy-MM-ddTHH:mm:ss.SSSZ');"
1600-12-31T19:00:00.000-0500
 
C:\Perl\site\lib\DateTime\TimeZone>
 
 
-- 
Jim Monty
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.