Date bug?

Nils Kassube kassube at gmx.net
Sat Oct 12 19:35:03 UTC 2013


Johnny Rosenberg wrote:
> 2013/10/12 Nils Kassube <kassube at gmx.net>
> > Why don't you try "date -d @0"? Then you would see that the output
> > is in CET which would be the correct time for your time zone at the
> > given date. If you need UTC, you could add the -u option.
> 
> ~$ date -d @0
> torsdag 1970-01-01 01:00
> ~$ date -ud @0
> torsdag 1970-01-01 00:00

Oh, that's interesting. I get a different output here which includes the 
time zone:

~/ > date -d @0
Do 1. Jan 01:00:00 CET 1970
~/ > date -d @0 -u
Do 1. Jan 00:00:00 UTC 1970

What do you see with the C locale? I get this:

~/ > LC_ALL=C date -d @0
Thu Jan  1 01:00:00 CET 1970
~/ > LC_ALL=C date -d @0 -u
Thu Jan  1 00:00:00 UTC 1970


Nils





More information about the ubuntu-users mailing list