From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Odd broken "--date=now" behavior in current git
Date: Tue, 14 Apr 2015 21:18:29 -0700 [thread overview]
Message-ID: <CA+55aFxvcN8Dz-t6fi6etycg+AiyR0crXv5AcfCdv8ji-iNBpw@mail.gmail.com> (raw)
I just noticed this because I had amended some merge commits with
git commit --amend --date=now
to update them, and that gets some funny broken timezones. I suspect
it's some silly daylight savings time issue.
Lookie here, I can reproduce it trivially with current git (in the git
repo itself):
[torvalds@i7 git]$ date; git commit -m Test --allow-empty --date=now
Tue Apr 14 21:11:03 PDT 2015
[master ec7733db5360] Test
Date: Tue Apr 14 20:11:03 2015 -0800
notice how the commit date message shows something funny. It shows an
hour earlier, but in -0800.
And the resulting commit is broken:
[torvalds@i7 git]$ git show --pretty=fuller
commit ec7733db5360966434e03eab1a849e6d4227231c (HEAD -> master)
Author: Linus Torvalds <torvalds@linux-foundation.org>
AuthorDate: Tue Apr 14 20:11:03 2015 -0800
Commit: Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Tue Apr 14 21:11:03 2015 -0700
Test
notice how the AuthorDate has that "-0800", but the CommitDate has "-0700".
Hmm.
I can't be the only one seeing this? My guess is that there's a
missing initialization of tm.tm_isdst somewhere or whatever.
The above is with current git:
[torvalds@i7 git]$ git version
git version 2.4.0.rc2
Anybody?
Linus
next reply other threads:[~2015-04-15 4:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 4:18 Linus Torvalds [this message]
2015-04-15 4:47 ` Odd broken "--date=now" behavior in current git Junio C Hamano
2015-04-15 7:22 ` Eric Sunshine
2015-04-15 14:42 ` Junio C Hamano
2015-04-15 16:21 ` [PATCH 1/2] parse_date_basic(): return early when given a bogus timestamp Junio C Hamano
2015-04-15 16:24 ` [PATCH 2/2] parse_date_basic(): let the system handle DST conversion Junio C Hamano
2015-04-15 17:23 ` Eric Sunshine
2015-04-15 16:20 ` Odd broken "--date=now" behavior in current git Linus Torvalds
2015-04-15 17:04 ` Junio C Hamano
2015-04-15 7:07 ` Peter Krefting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+55aFxvcN8Dz-t6fi6etycg+AiyR0crXv5AcfCdv8ji-iNBpw@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).