Re: Bug #630: date/time storage problem: timestamp parsed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: Thomas Lockhart <lockhart(at)fourpalms(dot)org>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #630: date/time storage problem: timestamp parsed
Date: 2002-04-10 05:01:42
Message-ID: 1676.1018414902@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Sean Chittenden <sean(at)chittenden(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sean Chittenden 2002-04-10 06:13:20 Re: Bug #630: date/time storage problem: timestamp parsed
Previous Message Sean Chittenden 2002-04-10 04:44:42 Re: Bug #630: date/time storage problem: timestamp parsed