There is a minor bug in offset_as_string, when calculating the offset for
negative timezones.
If you pass in the timezone -05:00, offset_as_string returns -19:00 this
is because, according to Perl, -5%24 == 19.
the solution is to change $hours %= 24 to $hours = abs($hours) % 24;
I've attached a patch.
Thanks,
kellan
--
"the truth is always revolutionary" [antonio gramsci]
[EMAIL PROTECTED]
diff -Naur DateTime/TimeZone.pm DateTime_abs/TimeZone.pm
--- DateTime/TimeZone.pm 2003-02-13 06:38:41.000000000 +0000
+++ DateTime_abs/TimeZone.pm 2003-02-13 06:39:29.000000000 +0000
@@ -249,7 +249,7 @@
my $sign = $offset < 0 ? '-' : '+';
my $hours = $offset / ( 60 * 60 );
- $hours %= 24;
+ $hours = abs($hours) % 24;
my $mins = ( $offset % ( 60 * 60 ) ) / 60;