CC: | <robert.hall [...] iinet.net.au> |
Subject: | short_name_for_datetime returns EST,CST,WST instead of AEST,ACST,AWST |
Date: | Wed, 22 Oct 2008 17:08:38 +1100 |
To: | <bug-DateTime-TimeZone [...] rt.cpan.org> |
From: | "Robert Hall" <Robert.Hall [...] ce.com.au> |
I have been using DateTime::TimeZone::short_name_for_datetime to put timezones on the end of my timestamps, but here in Australia, it yields an ambiguous short name. Our timezone names all begin with "A", but that is being left out by short_name_for_datetime.
my $tim = DateTime->now;
my $zon = DateTime::TimeZone->new( 'Australia/Sydney' );
my $nam = $zon->short_name_for_datetime( $tim ); # $nam is now EST, instead of AEST
Additionally, we are in Daylight time right now, so actually the short_name_for_datetime should be returning AEDT, ACDT, and AWDT.
AEST becomes Australian Eastern Daylight Time (AEDT), and clocks are advanced to UTC +11.
ACST becomes Australian Central Daylight Time (ACDT), and clocks are advanced to UTC +10 ½.
AWST becomes Australian Western Daylight Time (AWDT), and clocks are advanced to UTC +9.
See for example:
http://en.wikipedia.org/wiki/List_of_time_zones
The information contained in this email and any attached files are strictly
private and confidential. This email should be read by the intended addressee
only. If the recipient of this message is not the intended addressee, please
call Corporate Express Australia Limited on +61 2 9335 0555 or Corporate Express
New Zealand Limited on +64 9 279 2555 and promptly delete this email and any
attachments. The intended recipient of this email may only use, reproduce,
disclose or distribute the information contained in this email and any attached
files with Corporate Express' permission. If you are not the intended addressee,
you are strictly prohibited from using, reproducing, disclosing or distributing
the information contained in this email and any attached files. Corporate
Express advises that this email and any attached files should be scanned to
detect viruses. Corporate Express accepts no liability for loss or damage
(whether caused by negligence or not) resulting from the use of any attached
files.