GNU bug report logs - #11748
date: "Asia" Timezone

Previous Next

Package: coreutils;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Tue, 19 Jun 2012 20:05:01 UTC

Severity: wishlist

Merged with 9614, 14229

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 11748 <at> debbugs.gnu.org
Subject: bug#11748: "Asia" Timezone
Date: Wed, 20 Jun 2012 09:23:58 +0100
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.




This bug report was last modified 6 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.