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

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

[debbugs-tracker] bug#10413: closed (Invalid date result in specific dat


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10413: closed (Invalid date result in specific date operations)
Date: Sat, 31 Dec 2011 22:44:02 +0000

Your message dated Sat, 31 Dec 2011 15:39:58 -0700
with message-id <address@hidden>
and subject line Re: bug#10413: Invalid date result in specific date operations
has caused the debbugs.gnu.org bug report #10413,
regarding Invalid date result in specific date operations
to be marked as done.

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


-- 
10413: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10413
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Invalid date result in specific date operations Date: Thu, 29 Dec 2011 15:02:46 -0300 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0
How to repeat:


date -d '2011-08-21 + 1 DAY' +%Y-%m-%d
date -d '2010-10-10 + 1 DAY' +%Y-%m-%d

These dates is just when change from normal time UTC-4 to dts UCT-3

result: invalid date

The same operation with --utc works fine.
date -d '2011-08-21 + 1 DAY' +%Y-%m-%d --utc
date -d '2010-10-10 + 1 DAY' +%Y-%m-%d --utc










--- End Message ---
--- Begin Message --- Subject: Re: bug#10413: Invalid date result in specific date operations Date: Sat, 31 Dec 2011 15:39:58 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0
tag 10413 notabug
thanks

On 12/29/2011 11:02 AM, Vicente PĂ©rez M wrote:
> How to repeat:
> 
> 
> date -d '2011-08-21 + 1 DAY' +%Y-%m-%d
> date -d '2010-10-10 + 1 DAY' +%Y-%m-%d
> 
> These dates is just when change from normal time UTC-4 to dts UCT-3
> 
> result: invalid date
> 
> The same operation with --utc works fine.
> date -d '2011-08-21 + 1 DAY' +%Y-%m-%d --utc
> date -d '2010-10-10 + 1 DAY' +%Y-%m-%d --utc

Thanks for the report.  You failed to mention your exact TZ settings,
although you hinted at it via 'dts UTC-3', but the behavior you observed
is by design and not a bug.  In particular time zones, attempts to land
in a time that falls during the skipped hour are rejected, and using UTC
(which has no daylight savings) is a correct way to avoid the issue.
Another way is to pinpoint times to noon rather than the default of
midnight (no known time zone has a daylight savings transition at noon),
since your particular time zone appears to be among those zones where
the daylight savings rules kick in at midnight:

date -d '2011-08-21 12:00pm + 1 day' +%Y-%m-%d

More on this topic can be found in the FAQ:
https://www.gnu.org/software/coreutils/faq/#The-date-command-is-not-working-right_002e

-- 
Eric Blake   address@hidden    +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]