bug-coreutils
[Top][All Lists]
Advanced

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

bug#11101: Incorrect relative dates the day after DST switchover


From: Eric Blake
Subject: bug#11101: Incorrect relative dates the day after DST switchover
Date: Tue, 27 Mar 2012 10:41:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0

forcemerge 11098 11101
thanks

On 03/27/2012 10:04 AM, address@hidden wrote:
> Shortly after the DST jump in the United States on March 11th, the 'date'
> command returned an incorrect relevant date for the first hour after
> midnight.   See text capture below.

Thanks for the report.  However, you're the second person this week, and
adding to a long line of duplicate reporters in prior years, to notice
that 'date' is behaving as we have documented it.

https://lists.gnu.org/archive/html/bug-coreutils/2012-03/msg00102.html

'yesterday' means 'subtract 24 hours', but if you start at midnight
after a 23-hour day, subtracting 24 hours really does cross 2 calendar
dates.  If you want to avoid this issue, base your relative calculations
off of noon, not midnight, as suggested in our FAQ:

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

> date (GNU coreutils) 5.97

That's rather old; we just released 8.16.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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