[Top][All Lists]

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

Sh-utils 2.0: date cannot convert +%s output back

From: Andreas Schwab
Subject: Sh-utils 2.0: date cannot convert +%s output back
Date: 16 Jul 2001 17:30:47 +0200
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.0.103

The last date example in the manual gives a way to convert seconds since
the epoch to a readable date.  But that does not work for dates during
which DST is in effect in the local timezone.  For example, in the
Europe/Berlin timezone:

$ date --date='2000-08-01 UTC' +%s
$ date -d '1970-01-01 965088000 sec' +"%Y-%m-%d %T %z"
2000-08-01 01:00:00 +0200
$ date -d '1970-01-01 UTC 965088000 sec' +"%Y-%m-%d %T %z"
2000-08-01 03:00:00 +0200


Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5

reply via email to

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