Hello,
the command
git log --pretty=format:%ad --date=format:%s
displays wrong unixtime values; apparently how much the printed value
differs from the expected value depends on the system's time zone and
whether daylight savings time is enabled or not.
Here is a reproducible recipe compiled
Michael Heerdegen writes:
> the command
>
>git log --pretty=format:%ad --date=format:%s
>
> displays wrong unixtime values; apparently how much the printed value
> differs from the expected value depends on the system's time zone and
> whether daylight savings ti
Jeff King writes:
> This is probably a totally separate issue, as it would not be using
> strftime (or IIRC, any of the standard time functions at all). Do you
> have a detailed example that shows the problem?
Ok, this was probably false alarm. Magit (An Emacs Git front end) shows
rounded durat
Jeff King writes:
> 3. The epoch times for the latter lines should match.
FWIW, I think the epoch time is the most practical way to transfer the
time of a commit into a different program. When this program wants to
do it's own date arithmetic with it, unix time is just nice (no time
format pa
Jeff King writes:
> Oh, I agree that unix times are handy. I just think that "use %at in the
> pretty-format, instead of %ad and then %s in the date-format" is not
> such a bad workaround.
I had missed %at (and %ct). Yes, works perfectly - thanks for the hint.
Regards,
Michael.
--
To unsubsc
5 matches
Mail list logo