[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17600: Maybe a bug of `date`
From: |
Pádraig Brady |
Subject: |
bug#17600: Maybe a bug of `date` |
Date: |
Mon, 26 May 2014 16:57:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
tag 17600 notabug
close 17600
stop
On 05/26/2014 09:45 AM, HoHo Zhao wrote:
> Hi team,
>
> I found this "bug" maybe I am lazy to look through the info document.
>
> Correct:
> $ TZ=UTC date -d "15:00 BST"
> Mon May 26 14:00:00 UTC 2014
>
> Correct:
> $ TZ=UTC date -d "15:00 EST"
> Mon May 26 20:00:00 UTC 2014
>
> Correct:
> $ TZ=UTC date -d "15:00 JST" (Japan Standard Time)
> Mon May 26 06:00:00 UTC 2014
>
> Wrong:
> $ TZ=UTC date -d "15:00 CST" (China Standard Time)
> Mon May 26 21:00:00 UTC 2014
>
> So the problem is with "CST" in the date STRING.
>
> Thanks,
I think this is due to the ambiguity of CST.
You're better using unambiguous location based zones
TZ=UTC date -d 'TZ="Asia/Chongqing" 15:00'
More details at http://www.pixelbeat.org/docs/linux_timezones/
thanks,
Pádraig.