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: 40250
Status: resolved
Priority: 0/
Queue: DateTime-TimeZone

People
Owner: Nobody in particular
Requestors: Robert.Hall [...] ce.com.au
Cc:
AdminCc:

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



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.
Subject: Re: [rt.cpan.org #40250] short_name_for_datetime returns EST,CST,WST instead of AEST,ACST,AWST
Date: Wed, 22 Oct 2008 09:31:06 -0500 (CDT)
To: Robert Hall via RT <bug-DateTime-TimeZone [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 22 Oct 2008, Robert Hall via RT wrote: Show quoted text
> Wed Oct 22 02:09:03 2008: Request 40250 was acted upon. > Transaction: Ticket created by Robert.Hall@ce.com.au > Queue: DateTime-TimeZone > Subject: short_name_for_datetime returns EST,CST,WST instead of AEST,ACST,AWST > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: Robert.Hall@ce.com.au > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=40250 > > > > 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.
This information comes directly from the Olson time zone database. I'm not going to override what's in their data. If you want to ask them what's up with this, you can contact them here - http://www.twinsun.com/tz/tz-link.htm However, it's is well known that the short names are ambiguous. They're useful for display to users, but nothing more. Please don't respond to this ticket, or it will be re-opened. Feel free to discuss this on the datetime@perl.org list. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/