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

From: Eric Blake <[email-masked]>
Date: Tue, 27 Mar 2012 10:41:11 -0600

forcemerge 11098 11101
thanks

On 03/27/2012 10:04 AM, [email-masked] 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   [email-masked]    +1-919-301-3266
Libvirt virtualization library http://libvirt.org