help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Time zone trouble without time zones being involved


From: Michael Heerdegen
Subject: Re: Time zone trouble without time zones being involved
Date: Sat, 14 May 2016 20:53:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux)

Hi Yuri,

> Tests, please :)

Good news - I managed to bring me to do this now!  Hope you are still
reading this...

Here are the results.  It is 20:44 here now after I run the tests
(Central European Daylight savings time, the time zone of Berlin).


> 1. Mark the current UTC time, both as a human-readable string and as a
> unixtime value (e.g. on GNU, “date --utc --rfc-3339=seconds” and “date
> +%s”, respectively).

date --utc --rfc-3339=seconds => 2016-05-14 18:38:17+00:00
date +%s                      => 1463251129


> 2. Make a commit.  3. Execute the same command, “git log
> --pretty=format:%ad --date=format:%s -n1”.

1463254759

> 4. Evaluate (current-time) and convert the first two elements of the
> resulting 4-element list to unixtime.

(let ((time (current-time))) (+ (* 65536 (car time)) (cadr time)))
==> 1463251305


Looks like git is 1 hour wrong...?


TIA,

Michael.



reply via email to

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