bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11748: "Asia" Timezone


From: Pádraig Brady
Subject: bug#11748: "Asia" Timezone
Date: Wed, 20 Jun 2012 09:23:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 06/19/2012 09:00 PM, Boruch Baum wrote:
> I was recently showing off ...
> and I entered the following command
> 
> $ date && TZ=Asia/Moscow date
> Tue Jun 19 15:48:14 EDT 2012
> Tue Jun 19 19:48:14 Asia 2012
> $ TZ=Europe/Moscow date
> Tue Jun 19 23:48:59 MSK 2012
> 
> My initial reaction, besides some embarrassment
> at getting the continent wrong (and most of
> Russia's timezone are in Asia), is that this
> is a bug in the coreutils date command.
> However, I've also posted this info to the
> iana timezone mailing list, just in case.
> 
> It's a double bug. The date command is printing
> out a non-existent timezone, and it's using GMT for
> "Asia".

So this is due to TZ needing to support two formats.
POSIX and location based.

The POSIX format is a zone[+offset] format, though
is nonsensical and best avoided as detailed here:
http://www.pixelbeat.org/docs/linux_timezones/index.html

The location based format is what you were trying
to use here, but date fell back to the POSIX format
when there was no match.

Now on GNU/Linux you could warn if there was
no match for TZ with a leading ':' or non number after '/'
But I can't see a way to determine if tzset(3) did
find a match or not :(

cheers,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]