[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: |
Tue, 17 May 2016 16:57:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) |
Yuri Khan <yuri.v.khan@gmail.com> writes:
> So, for the time being, as a workaround, you can use something like
> "git cat-file commit HEAD | sed -nr 's/^author .* ([0-9]+)
> [-+][0-9]+$/\1/p; t'" to get the UTC timestamp from the last commit.
Hmm, I hoped I can do without a shell.
Do you think the unixtime value as printed in
git log --pretty=format:%ad --date=raw -n1
can be relied on? Can I ignore the printed time zone delta?
[BTW, the doc of git-log tells that
--date=raw shows the date in the internal raw Git format %s %z format.
but this seems to be a different %s because raw shows a different time]
Thanks,
Michael.