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

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

[Emacs-bug-tracker] bug#9283: closed (date increment failure for 2011-10


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#9283: closed (date increment failure for 2011-10-30)
Date: Thu, 11 Aug 2011 18:03:01 +0000

Your message dated Thu, 11 Aug 2011 10:48:38 -0600
with message-id <address@hidden>
and subject line Re: bug#9283: date increment failure for 2011-10-30
has caused the GNU bug report #9283,
regarding date increment failure for 2011-10-30
to be marked as done.

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


-- 
9283: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9283
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: date increment failure for 2011-10-30 Date: Thu, 11 Aug 2011 11:52:20 +0100
Here's what I found adding +1 days to a 2011-10-30
(BTW this is not a problem for any other date I tried)


fut=$(date -d"2011-10-30" '+%F') ;
echo $fut
2011-10-30


fut=$(date -d"$fut +1 days" '+%F') ;
echo $fut
2011-10-30


fut=$(date -d"$fut +2 days" '+%F') ;
echo $fut
2011-10-31


Is this reproducable for anyone else ?

uname -a
Linux xxxxxxxxx  2.6.16.60-0.58.1-smp #1 SMP Wed Dec 2 12:27:56 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux


Regards,
Mike


************************************************************
HSBC Bank plc
Registered Office: 8 Canada Square, London E14 5HQ
Registered in England - Number 14259
Authorised and regulated by the Financial Services Authority
************************************************************
----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy.
--- End Message ---
--- Begin Message --- Subject: Re: bug#9283: date increment failure for 2011-10-30 Date: Thu, 11 Aug 2011 10:48:38 -0600 User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11
tag 9283 notabug
thanks

On 08/11/2011 04:52 AM, address@hidden wrote:
Here's what I found adding +1 days to a 2011-10-30
(BTW this is not a problem for any other date I tried)

Thanks for the report. However, this is not a bug, but a consequence of daylight savings in your current choice of timezone. This is a FAQ:

https://www.gnu.org/software/coreutils/faq/#The-date-command-is-not-working-right_002e

fut=$(date -d"2011-10-30" '+%F') ;
echo $fut
2011-10-30


fut=$(date -d"$fut +1 days" '+%F') ;
echo $fut
2011-10-30

Adding 24 hours to midnight on a day with 25 hours still results in the same day, explaining your results. The FAQ details several options for avoiding the issue, such as fixing your calculations to UTC (which does not have daylight savings) or basing your computations relative to noon instead of midnight (since both a computed 11am and 1pm still fall in the right day, if your relative computation was affected by a daylight savings adjustment).

This transmission has been issued by a member of the HSBC Group

Employer disclaimers cannot be enforced on publicly archived lists; it is considered better netiquette to send mail from private email accounts that will not append unenforceable text.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--- End Message ---

reply via email to

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