Re: Odd broken --date=now behavior in current git

2015-04-15 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: Later parse_date_basic() computes the offset from GMT by comparing the values returned by tm_to_time_t() and mktime(). The existing 'tm' is passed to mktime() with the tm_isdst field already set to 0 by gmtime_r(), and mktime() respects that as a

Re: Odd broken --date=now behavior in current git

2015-04-15 Thread Junio C Hamano
Linus Torvalds torva...@linux-foundation.org writes: On Wed, Apr 15, 2015 at 12:22 AM, Eric Sunshine sunsh...@sunshineco.com wrote: The fix seems to be simply: Yup, that seems to do it for me. I'm not sure how we get to match_digit() with the time string now, though. The --date=when

Re: Odd broken --date=now behavior in current git

2015-04-15 Thread Linus Torvalds
On Wed, Apr 15, 2015 at 12:22 AM, Eric Sunshine sunsh...@sunshineco.com wrote: The fix seems to be simply: Yup, that seems to do it for me. I'm not sure how we get to match_digit() with the time string now, though. So your patch fixes things for me, but I think: - we should move the

Re: Odd broken --date=now behavior in current git

2015-04-15 Thread Eric Sunshine
On Tue, Apr 14, 2015 at 09:47:38PM -0700, Junio C Hamano wrote: Linus Torvalds torva...@linux-foundation.org writes: 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

Re: Odd broken --date=now behavior in current git

2015-04-15 Thread Peter Krefting
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

Re: Odd broken --date=now behavior in current git

2015-04-14 Thread Junio C Hamano
Linus Torvalds torva...@linux-foundation.org writes: 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

Odd broken --date=now behavior in current git

2015-04-14 Thread Linus Torvalds
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