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

2015-04-15 Thread Junio C Hamano
Linus Torvalds writes: > On Wed, Apr 15, 2015 at 12:22 AM, Eric Sunshine > 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= parameter is read by determine_author_info() and

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 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 "tm.tm_isdst = -1;" up a b

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

2015-04-15 Thread Junio C Hamano
Eric Sunshine 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 statement that DST i

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 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 14 21:11:03 PDT 201

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 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 reproduce it trivially wit

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 itself)