On Mon Mar 22 02:52:08 2010, ANDK wrote:
Show quoted text> The only PASS since then are with Date::Manip 5.5x.
It looks like this is actually to do with the recent changes to
Date::Manip's timezone handling. Specifically, how it deals with
ambiguous timezone abbreviations.
The test in t/01conversions.t uses the abbreviation "EST". However
according to [0], there are three different timezones all with the
abbreviation "EST":
EST Eastern Summer Time Australia UTC + 11 hours
EST Eastern Standard Time Australia UTC + 10 hours
EST Eastern Standard Time North America UTC - 5 hours
It appears that the old version of Date::Manip used to pick the North
American "EST", whereas the new one is choosing the Australian Eastern
Summer Time. This gives a 16 hour shift between the expected value and
the actual result.
The following patch amends the test to use the timezone string
"US/Eastern" instead, removing the ambiguity:
Index: t/01conversions.t
===================================================================
--- t/01conversions.t (revision 54833)
+++ t/01conversions.t (working copy)
@@ -10,7 +10,7 @@
my $dfdm = "DateTime::Format::DateManip";
## Set the timezone for Date::Manip and DateTime
-my $dm_tz = "EST";
+my $dm_tz = "US/Eastern";
my $dt_tz = "US/Eastern";
# Setup Date::Manip manually so we can force the TZ to beat a config
@@ -21,7 +21,7 @@
my @dm_to_dt_tests =
(["March 23, 2003" =>
DateTime->new(year => 2003, month => 3, day => 23, time_zone =>
$dt_tz) ],
- ["March 23, 2003 12:00 EST" =>
+ ["March 23, 2003 12:00 US/Eastern" =>
DateTime->new(year => 2003, month => 3, day => 23,
hour => 12, time_zone => $dt_tz) ],
);
[0]
http://www.timeanddate.com/library/abbreviations/timezones/
--
Chris Butler <chrisb@debian.org>
GnuPG Key ID: 4096R/49E3ACD3