Re: Odd broken "--date=now" behavior in current git
- From
Peter Krefting <peter@softwolves.pp.se>
- Date
- Apr 15, 2015, 07:07 UTC
- Message-ID
- <alpine.DEB.2.00.1504150803370.8606@ds9.cixit.se>
- In-Reply-To
- <CA+55aFxvcN8Dz-t6fi6etycg+AiyR0crXv5AcfCdv8ji-iNBpw@mail.gmail.com>
Linus Torvalds:
> 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.
I can confirm it if I enable DST on my machine (I usually run my machines on CET all-year, to avoid these kind of issues):
$ echo $TZ
Europe/Oslo
$ git commit -m b
[master dee7ec1] b
1 file changed, 1 insertion(+)
create mode 100644 b.txt
$ git show --pretty=fuller
commit dee7ec1cda74a8abd7f26c60ee1e83f73bb31194 (HEAD -> master)
Author: Peter Krefting <peter.krefting@bridgetech.tv>
AuthorDate: 2015-04-15 09:04:34 +0200
Commit: Peter Krefting <peter.krefting@bridgetech.tv>
CommitDate: 2015-04-15 09:04:34 +0200
[...]
$ git commit --amend --date=now
[...]
$ git show --pretty=fuller
commit b4561e5a077de7bbcaf9fc06350ea24407adcec0 (HEAD -> master)
Author: Peter Krefting <peter.krefting@bridgetech.tv>
AuthorDate: 2015-04-15 08:05:04 +0100
Commit: Peter Krefting <peter.krefting@bridgetech.tv>
CommitDate: 2015-04-15 09:05:04 +0200So the datetime is correct, it's just the timezone that is wrong (08:05+0100 = 09:05+0200).
$ git --version git version 2.4.0.rc1
-- \\// Peter - http://www.softwolves.pp.se/