bug-coreutils
[Top][All Lists]
Advanced

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

Re: date and UTC and GMT odd behaviour


From: Andreas Schwab
Subject: Re: date and UTC and GMT odd behaviour
Date: Tue, 23 Aug 2005 18:08:51 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

"Mike 'Mike' Jones" <address@hidden> writes:

> A little bit of trial-and-error and I find that the anomaly is limited to
> between 6pm, 23 Jun 1968 GMT and 2am, 31 Oct 1971:
>
> $ date -d "Sat Oct 31 01:59:59 UTC 1971" +%s
> 57722399
> $ date -d "Sat Oct 31 01:59:59 GMT 1971" +%s
> 57718799
>
> $ date -d "Sat Oct 31 02:00:00 UTC 1971" +%s
> 57722400
> $ date -d "Sat Oct 31 02:00:00 GMT 1971" +%s
> 57722400
>
> and
>
> $ date -d "Sun Jun 23 18:00:00 UTC 1968" +%s
> -48060000
> $ date -d "Sun Jun 23 18:00:00 GMT 1968" +%s
> -48063600
>
> $ date -d "Sun Jun 23 17:59:59 UTC 1968" +%s
> -48060001
> $ date -d "Sun Jun 23 17:59:59 GMT 1968" +%s
> -48060001

I can't reproduce that here.  I get the same (correct) output whether I
use UTC or GMT.

> This means that using:
> $ date -d "Tue Jan 01 00:00:00 GMT 1970 + NNNNN seconds"

Better use date -d "@NNNNNN".

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
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]