git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* timezone related bug of git
@ 2021-10-31  3:23 Dongsheng Song
  2021-10-31  8:53 ` Jeff King
  0 siblings, 1 reply; 12+ messages in thread
From: Dongsheng Song @ 2021-10-31  3:23 UTC (permalink / raw)
  To: Git Mailing List

Hi,

 I found a timezone related bug in the git:

1. git log 11990eba -1 --date=format:%s

commit 11990eba0be50d1ad0655ede4062b7130326c41f (HEAD -> trunk,
origin/trunk, origin/HEAD)
Author: rillig <rillig@NetBSD.org>
Date:   1635604878

    indent: move debugging functions to a separate section

2. git cat-file -p 11990eba

tree 5d62150f5e2bafd3db76641450ca5d902302a039
parent 892557a74bd49983fac28366b772b53c9216ca73
author rillig <rillig@NetBSD.org> 1635633678 +0000
committer rillig <rillig@NetBSD.org> 1635633678 +0000

indent: move debugging functions to a separate section

3. conclusion

The unix time stored in git repository not same as the git log output,
then there must be a timezone offset bug:

1635633678 - 1635604878 = 28800 = 8 hours (local timezone offset)

Best regards,
Cauchy Song

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-11-04  2:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-31  3:23 timezone related bug of git Dongsheng Song
2021-10-31  8:53 ` Jeff King
2021-10-31 13:18   ` Dongsheng Song
2021-10-31 18:46     ` Junio C Hamano
2021-11-01  4:03       ` Jeff King
2021-11-01 14:31         ` Dongsheng Song
2021-11-01 18:18         ` Junio C Hamano
2021-11-02  1:43           ` Jeff King
2021-11-02 11:35           ` [PATCH] strbuf_addftime(): handle "%s" manually Jeff King
2021-11-02 15:43             ` Jeff King
2021-11-03 20:28             ` Junio C Hamano
2021-11-04  2:11               ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).