Re: Problem with 7.3 on Irix with dates before 1970

From: "Robert E(dot) Bruccoleri" <bruc(at)stone(dot)congenomics(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: bruc(at)acm(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem with 7.3 on Irix with dates before 1970
Date: 2002-11-08 22:31:20
Message-ID: 200211082231.RAA46335@stone.congenomics.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Tom,
Here's the result of your queries:

template1=# set TimeZone TO 'PST8PDT';
SET
template1=# select abstime 'May 10, 1947 23:59:12';
abstime
------------------------
1947-05-10 22:59:12-08
(1 row)

template1=# select (abstime 'May 10, 1947 23:59:12')::int4;
int4
------------
-714589248
(1 row)

--Bob
>
>
> "Robert E. Bruccoleri" <bruc(at)stone(dot)congenomics(dot)com> writes:
> > There are differences in the regression tests for PostgreSQL
> > 7.3b2 with handling of times before 1970. I recently sent out a set of
> > diffs for the changes. I've looked through the datetime.c code, but
> > it's not obvious to me what the cause of the change is. PostgreSQL 7.2
> > works fine on Irix for these cases.
>
> I have a feeling that it's got something to do with the workaround for
> broken mktime() that I recently put in. Could you try this experiment
> and see what you get? (This should at least tell us whether the
> variance from common behavior is on the input side or the output side.)
>
> regression=# set TimeZone TO 'PST8PDT';
> SET
> regression=# select abstime 'May 10, 1947 23:59:12';
> abstime
> ------------------------
> 1947-05-10 23:59:12-08
> (1 row)
>
> regression=# select (abstime 'May 10, 1947 23:59:12')::int4;
> int4
> ------------
> -714585648
> (1 row)
>
>
> regards, tom lane
>

+-----------------------------+------------------------------------+
| Robert E. Bruccoleri, Ph.D. | email: bruc(at)acm(dot)org |
| P.O. Box 314 | URL: http://www.congen.com/~bruc |
| Pennington, NJ 08534 | |
+-----------------------------+------------------------------------+

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-11-08 23:11:23 Re: RC1 on Friday?
Previous Message Tom Lane 2002-11-08 21:48:21 Re: Problem with 7.3 on Irix with dates before 1970