On Mon, 5 Nov 2007, Kit kat wrote:

5B> The following is beyond my (limited) knowledge of Perl:

I have installed DateTime-0.41and I have been able to create an error by
calling strftime with a '%z' in the input string, but it seems to calculate
the UTC offset correctly. The strange part is that the error is only showing
up in my error logs and not if I try invoking the test script via the
commandline:

Can't call method "isa" without a package or object reference at
/usr/lib/perl5/site_perl/5.8.5/DateTime/TimeZone.pm line 482

The line in question:

shift if eval { $_[0]->isa('DateTime::TimeZone') };

I can only assume that the item passed is undef, so the eval fails. A basic
test that shows the error:

my $now = DateTime->now();
$now->set_time_zone("Europe/London");
print qq{GMT: }. $now->strftime("%Y-%m-%d %H:%M:%S (GMT %z)");

I'm using Perl v5.8.5 for x86_64-linux-thread-multi with mod_perl

The real problem is that the eval fails, which is fine, but it leaves $@ set to something. Then some other non-DateTime code is checking $@ and finding the error, and logging it.

I'll fix DT::TZ so it localizes [EMAIL PROTECTED]


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to