Re: Bug #630: date/time storage problem: timestamp parsed
Andreas Schwab <schwab@suse.de>
From: Andreas Schwab <schwab@suse.de>
To: Thomas Lockhart <lockhart@fourpalms.org>
Cc: Reinhard Max <max@suse.de>, Sean Chittenden <sean@chittenden.org>, pgsql-bugs@postgresql.org, Andreas Jaeger <aj@suse.de>
Date: 2002-04-11T16:19:24Z
Lists: pgsql-bugs
Thomas Lockhart <lockhart@fourpalms.org> writes: |> > This is the bug report against glibc that prompted the change: |> > http://bugs.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=default&pr=2738 |> > |> Ah, but this might explain why I've always seen on my Linux box a 1 |> > |> second offset returned from mktime() for dates before 1970. Everything |> > |> is shifted to allow -1 to be a special value I'll bet... |> > This is a joke, isn't it? |> |> Yes and no; the behavior is in localtime(), not mktime() -- sorry for my |> faulty memory. The case I am handling is in recovering local time given |> a time_t (in UTC of course). I have independently derived a broken-down |> time structure, so have both the original structure and the results of |> localtime() available in my code. Here is the relevant comment snippet: Do you have a testcase? Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."