Date bug?

Johnny Rosenberg gurus.knugum at gmail.com
Sun Oct 13 08:36:23 UTC 2013


2013/10/12 Nils Kassube <kassube at gmx.net>

> 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
>

~$ 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
~$

I think I configured my date format a couple of years ago. I only use
ISO-8601 date format (which happens to be almost identical to my locale)
for everything I do, so I try to configure everything, if possible, to use
that and nothing else. Since I did that long ago, I don't how a clue now
how I did it… unless I made a note somewhere.


Johnny Rosenberg


>
>
> Nils
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20131013/c7037bcc/attachment.html>


More information about the ubuntu-users mailing list