bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Oddity or bug in GNU date installation?


From: Andreas Schwab
Subject: Re: Oddity or bug in GNU date installation?
Date: Wed, 05 May 2010 16:43:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Georg Bauhaus <address@hidden> writes:

> $ date '--date=2010-03-30 - 3 day' +%Y%m%d
> 20100326
> $ date '--date=2010-03-31 - 3 day' +%Y%m%d
> 20100327
> $ date '--date=2010-04-01 - 3 day' +%Y%m%d
> 20100329

You are crossing the DST boundary, where a day can be less than 24
hours, but date calculations always assume 1 day == 86400 seconds.  Use
noon instead of midnight as the reference point.

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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