On Sun, 30 Jul 2006, kenichi ishigaki wrote:
Hi, with these patches, DateTime::TimeZone->new('local')
will work properly under the cirtcumstances with TZ=JST-9
(common setting in Japan, means TZ=+0900).
If JST-9 is a common time zone, I'd think the simplest thing would be to
just add it to the list of links in DateTime::TimeZoneCatalog, and link it
to the Asia/Japan zone. Of course, then it'd have the same DST rules as
that zone, which may not be what you want.
03:41:15.264500000 +0900
@@ -448,6 +448,13 @@
{
( $sign, $hours, $minutes, $seconds ) = ( $1, $2, $3, $4 );
}
+ # allow "TZ = JST - 9" format; this is equivalent TZ = +0900
+ elsif ( $offset =~ /^(\w+)\s*([\+\-])\s*(\d{1,2})$/ )
+ {
+ my $zone;
+ ( $zone, $sign, $hours, $minutes, $seconds ) = ( $1, $2, $3, 0, 0 );
+ $sign =~ tr/\+\-/-+/ unless uc $zone eq 'UTC';
+ }
This is pretty loose. It'd allow someone to pass in "QZX-97" too, which
doesn't seem right at all.
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/