At 2010-09-23 17:37:51 -0400, t...@sss.pgh.pa.us wrote:
>
> Hm.  What git version are you using?

I'm using 1.7.3, yes. It has a bunch of timezone handling changes, but
I'm not sure if there's anything related to your problem. If you don't
have TZ set in your environment, I suppose the following patch *could*
be relevant, since you're in -0400 and I'm in +0530. I haven't tried
to verify this, but if cat-file -p on your backported commit shows an
absurdly high timezone value, then that's the problem.

Anyway, try 1.7.3 and see if it helps?

-- ams

commit 9ba0f0334dd505f78e0374bbe857c5e202f5a778
Author: Jeff King <p...@peff.net>
Date:   Sun Jul 4 07:00:17 2010 -0400

    parse_date: fix signedness in timezone calculation
    
    When no timezone is specified, we deduce the offset by
    subtracting the result of mktime from our calculated
    timestamp.
    
    However, our timestamp is stored as an unsigned integer,
    meaning we perform the subtraction as unsigned. For a
    negative offset, this means we wrap to a very high number,
    and our numeric timezone is in the millions of hours. You
    can see this bug by doing:
    
       $ TZ=EST \
         GIT_AUTHOR_DATE='2010-06-01 10:00' \
         git commit -a -m foo
       $ git cat-file -p HEAD | grep author
       author Jeff King <p...@peff.net> 1275404416 +119304128
    
    Instead, we should perform this subtraction as a time_t, the
    same type that mktime returns.
    
    Signed-off-by: Jeff King <p...@peff.net>
    Signed-off-by: Junio C Hamano <gits...@pobox.com>

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to