Subject: bug#17451: closed (Re: bug#17451: date command: Bug?)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 10 May 2014 19:20:04 +0000

Your bug report

#17451: date command: Bug?

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17451: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17451
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17451: date command: Bug?
From: Eric Blake <[email-masked]>
To: "Yin, Dazhong@ARB" <[email-masked]>, [email-masked]
Date: Sat, 10 May 2014 13:19:03 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

tag 17451 notabug
thanks

On 05/09/2014 12:07 PM, Yin, Dazhong@ARB wrote:
> When querying the time zone, the date command cannot deal with the hour when time changes from standard time to daylight saving time.

That's because that hour does not exist in your timezone.

All of your examples look like correct behavior to me.  You've asked a FAQ:
https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-date-command-is-not-working-right_002e

Our advice is to compute dates in UTC, or when sticking to a locale with
daylight savings, then compute dates relative to noon rather than near
the hour that might disappear or be doubled.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Subject: date command: Bug?
From: "Yin, Dazhong@ARB" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Fri, 9 May 2014 18:07:06 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

When querying the time zone, the date command cannot deal with the hour when time changes from standard time to daylight saving time.  Below examples show the tests done in the Pacific time zone.

-----------------------------------------------------------------------------------------------------------------------------------------------

date -d "20120311 01" +%:::z
-08

date -d "20120311 02" +%:::z
date: invalid date `20120311 02'

date -d "20120311 03" +%:::z
-07

date -d "20140309 01" +%:::z
-08

date -d "20140309 02" +%:::z
date: invalid date `20140309 02'

date -d "20140309 03" +%:::z
-07