<div dir="ltr">2013/10/12 Nils Kassube <span dir="ltr"><<a href="mailto:kassube@gmx.net" target="_blank">kassube@gmx.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Johnny Rosenberg wrote:<br>
> $ date -d @0 +%s<br>
> 0<br>
> $<br>
><br>
> Correct. ”%c” means, according to the man pages, ”seconds since<br>
> 1970-01-01 00:00:00 UTC”.<br>
><br>
> Now:<br>
> $ date -d @0 +'%F %T'<br>
> 1970-01-01 01:00:00<br>
> $<br>
><br>
> Is this correct? Is ”1970-01-01 01:00:00” the same as ”1970-01-01<br>
> 00:00:00 UTC”?<br>
><br>
> Is my locale settings involved somehow? I live in Sweden which is<br>
> UTC+01:00, and we have summer time (DST) right now. My guess is that<br>
> what I see in my examples above is the UTC+01:00 thing.<br>
<br>
</div>Why don't you try "date -d @0"? Then you would see that the output is in<br>
CET which would be the correct time for your time zone at the given<br>
date. If you need UTC, you could add the -u option.<br></blockquote><div><br></div><div>~$ date -d @0<br>torsdag 1970-01-01 01:00<br>~$ date -ud @0<br>torsdag 1970-01-01 00:00<br>~$</div><div><br></div><div>Thanks, the -u thing was what I was looking for. I guess I just didn't understand it at first.</div>
<div><br></div><div>Johnny Rosenberg</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><font color="#888888"><br>
<br>
Nils<br>
<br>
<br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com" target="_blank">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</font></span></blockquote><br></div>