Download raw body.
Regress failures: regress, histedit
Stefan Sperling:
> Yes, there is a mix of gmtime_r() and localtime_r().
> This cannot be right.
>
> My goal is to consistently output commit timestamps in UTC.
So let's look at all uses of localtime_r() in the tree:
got.c:blame_cb
This is the date in "blame".
=> Needs to be switched to UTC.
got.c:get_commit_brief_str
This shows up in "ref -l"/"histedit -l".
=> Needs to be switched to UTC.
got.c:print_path_info
This is the output of "info <file>", e.g.
$ got info Makefile
[...]
file: Makefile
mode: 644
timestamp: Wed Jun 23 22:35:53 2021 CEST
based on blob: 5e96ac3cb604c6c6ffb943a5f7620395583905f4
based on commit: 535e07c7d678cfc4a2b6ad61f72c36e0a46e5111
That appears to reflect stat.st_mtim.
=> ?? I don't know.
gotweb.c:gw_blame_cb
This is the date in "blame".
=> Needs to be switched to UTC.
tog.c:draw_commit
That's the date in the log view.
=> Needs to be switched to UTC.
I guess the actual code change is as simple as s/localtime_r/gmtime_r/.
--
Christian "naddy" Weisgerber naddy@mips.inka.de
Regress failures: regress, histedit