Re: Bug #630: date/time storage problem: timestamp parsed - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #630: date/time storage problem: timestamp parsed
Date
Msg-id 1676.1018414902@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug #630: date/time storage problem: timestamp parsed  (Sean Chittenden <sean@chittenden.org>)
Responses Re: Bug #630: date/time storage problem: timestamp parsed
List pgsql-bugs
Sean Chittenden <sean@chittenden.org> writes:
> Ehh... let me hack/check.  Looks like 11.  ??  In
> lib/libc/stdtime/localtime.c, WRONG is defined as -1, not 11.

> 1490                    t = mktime(tmp);
> (gdb)
> 1491                    fprintf(stderr, "%p\n", t);  /* GCC optimizes this
>                                                         away if I don't do
>                             something */
> (gdb)
> 0x3c5e5ba0
> (gdb) print t
> $1 = 11

> Doesn't make much sense to me where that'd come from...  ? -sc

I'd be inclined to believe the 0x3c5e5ba0 (= Mon Feb 04 2002, 05:00:00
EST according to my local time code) and not the 11.  I think gdb is
dropping the ball here; most likely, failing to warn you that the
register that once held t wasn't preserved over the fprintf function
call.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Sean Chittenden
Date:
Subject: Re: Bug #630: date/time storage problem: timestamp parsed
Next
From: Sean Chittenden
Date:
Subject: Re: Bug #630: date/time storage problem: timestamp parsed