GNU bug report logs - #17600
Maybe a bug of `date`

Previous Next

Package: coreutils;

Reported by: HoHo Zhao <hzhao <at> redhat.com>

Date: Mon, 26 May 2014 15:46:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17600 in the body.
You can then email your comments to 17600 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#17600; Package coreutils. (Mon, 26 May 2014 15:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to HoHo Zhao <hzhao <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 26 May 2014 15:46:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: HoHo Zhao <hzhao <at> redhat.com>
To: bug-coreutils <at> gnu.org
Subject: Maybe a bug of `date`
Date: Mon, 26 May 2014 16:45:55 +0800
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,
-- 
HoHo Zhao
Regional IT Support
Red Hat Greater China




Information forwarded to bug-coreutils <at> gnu.org:
bug#17600; Package coreutils. (Mon, 26 May 2014 15:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 17600 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: HoHo Zhao <hzhao <at> redhat.com>
Cc: 17600 <at> debbugs.gnu.org
Subject: Re: bug#17600: Maybe a bug of `date`
Date: Mon, 26 May 2014 16:57:24 +0100
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.




Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Mon, 26 May 2014 15:59:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 17600 <at> debbugs.gnu.org and HoHo Zhao <hzhao <at> redhat.com> Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Mon, 26 May 2014 15:59:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#17600; Package coreutils. (Mon, 26 May 2014 16:00:04 GMT) Full text and rfc822 format available.

Message #15 received at submit <at> debbugs.gnu.org (full text, mbox):

From: HoHo Zhao <hzhao <at> redhat.com>
To: bug-coreutils <at> gnu.org
Subject: Re: Maybe a bug of `date`
Date: Mon, 26 May 2014 17:36:02 +0800
Hi,

I sent too fast.

Here's the package versions I tested on:
	coreutils-8.21-21.fc20.x86_64
	tzdata-2014c-1.fc20.noarch

And some versions in HREL6 don't work either.

I heard that newer version no longer has this problem, sorry for
troubling. This is the version I heard it works well:
	coreutils-8.22-11.el7.x86_64
	tzdata-2014b-1.el7.noarch

As I saw this problem both exist in Fedora and RHEL, I thought it might
be a problem in the up stream, hence why I shot my mail too fast to you
instead of shooting to Red Hat Bugzilla.


On 2014/5/26 16:45, 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,
> 

-- 
HoHo Zhao
Regional IT Support
Red Hat Greater China

Ext. (PEK)83-89380 Tel. +86 10 6533 9380 (Mon, Wed, Thu)
Ext. (NAY)83-88258 Tel. +86 10 6260 8258 (Tue, Fri)




Information forwarded to bug-coreutils <at> gnu.org:
bug#17600; Package coreutils. (Tue, 27 May 2014 02:56:01 GMT) Full text and rfc822 format available.

Message #18 received at 17600 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: HoHo Zhao <hzhao <at> redhat.com>, 17600 <at> debbugs.gnu.org
Subject: Re: bug#17600: Maybe a bug of `date`
Date: Mon, 26 May 2014 20:55:49 -0600
HoHo Zhao wrote:
> 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.

CST in the above is being interpreted as US Central Standard Time.
For Central Standard Time it is correct.

CST is one of the ambiguous timezones that Pádraig referred to.  This
is one of the reasons "date -R" with the unambiguous numeric timezones
is the better output format.

Bob




Information forwarded to bug-coreutils <at> gnu.org:
bug#17600; Package coreutils. (Tue, 27 May 2014 03:19:02 GMT) Full text and rfc822 format available.

Message #21 received at 17600 <at> debbugs.gnu.org (full text, mbox):

From: HoHo Zhao <hzhao <at> redhat.com>
To: Bob Proulx <bob <at> proulx.com>, 17600 <at> debbugs.gnu.org
Subject: Re: bug#17600: Maybe a bug of `date`
Date: Tue, 27 May 2014 11:17:38 +0800
Thank you Bob. I got it clear.

On 2014/5/27 10:55, Bob Proulx wrote:
> HoHo Zhao wrote:
>> 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.
> 
> CST in the above is being interpreted as US Central Standard Time.
> For Central Standard Time it is correct.
> 
> CST is one of the ambiguous timezones that Pádraig referred to.  This
> is one of the reasons "date -R" with the unambiguous numeric timezones
> is the better output format.
> 
> Bob
> 
> 

-- 
HoHo Zhao
Regional IT Support
Red Hat Greater China




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 24 Jun 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 363 days ago.

Previous Next


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