Subject: | DateTime::TimeZone::Local broken when TZ == 0 |
Due to a bad test in DateTime/TimeZone/Local.pm, the function TimeZone
always died for me, as my TZ is 0.
Find attached a patch that fixes the problem.
Moreover, there was a syntax type, I guess, about a space between a
dollar sign and the variable name.
Subject: | patch.diff |
--- /usr/local/share/perl/5.8.8/DateTime/TimeZone/Local.pm.orig 2007-12-10 22:28:46.000000000 +0100
+++ /usr/local/share/perl/5.8.8/DateTime/TimeZone/Local.pm 2007-12-10 22:29:06.000000000 +0100
@@ -16,10 +16,10 @@
my $subclass = $class->_load_subclass();
- for my $ meth ( $subclass->Methods() )
+ for my $meth ( $subclass->Methods() )
{
my $tz = $subclass->$meth();
- return $tz if $tz;
+ return $tz if defined $tz;
}
die "Cannot determine local time zone\n";