Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-TimeZone CPAN distribution.

Report information
The Basics
Id: 31351
Status: rejected
Priority: 0/
Queue: DateTime-TimeZone

People
Owner: Nobody in particular
Requestors: sukria [...] sukria.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



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";
Subject: Re: [rt.cpan.org #31351] DateTime::TimeZone::Local broken when TZ == 0
Date: Mon, 10 Dec 2007 16:13:17 -0600 (CST)
To: Alexis Sukrieh via RT <bug-DateTime-TimeZone [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Mon, 10 Dec 2007, Alexis Sukrieh via RT wrote: Show quoted text
> Due to a bad test in DateTime/TimeZone/Local.pm, the function TimeZone > always died for me, as my TZ is 0.
The timezone being returned here is an object, not a string or number, so if it's defined it's also true. Setting your TZ env var to 0 should work. Show quoted text
> Moreover, there was a syntax type, I guess, about a space between a > dollar sign and the variable name.
Bizarrely, this never caused a syntax error. I'm not sure exactly how Perl was interpreting that though. -dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/