emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#17451: closed (date command: Bug?)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17451: closed (date command: Bug?)
Date: Sat, 10 May 2014 19:20:04 +0000

Your message dated Sat, 10 May 2014 13:19:03 -0600
with message-id <address@hidden>
and subject line Re: bug#17451: date command: Bug?
has caused the debbugs.gnu.org bug report #17451,
regarding date command: Bug?
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17451: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17451
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: date command: Bug? Date: Fri, 9 May 2014 18:07:06 +0000

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


--- End Message ---
--- Begin Message --- Subject: Re: bug#17451: date command: Bug? Date: Sat, 10 May 2014 13:19:03 -0600 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
tag 17451 notabug
thanks

On 05/09/2014 12:07 PM, Yin, address@hidden 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

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

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