From: | Andrew - Supernews <andrew+nonews(at)supernews(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #1637: age() function is giving different results |
Date: | 2005-04-29 16:04:46 |
Message-ID: | slrnd74mou.26ds.andrew+nonews@trinity.supernews.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2005-04-29, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew - Supernews <andrew+nonews(at)supernews(dot)com> writes:
>> I did some analysis for this one when it was mentioned just now in the irc
>> chan. I can reproduce on 7.4.x as follows:
>
>> test=> set timezone to 'America/Buenos_Aires';
>> SET
>> test=> select age(date '2005-05-05', date '1964-05-05');
>> age
>> -----------------------------------
>> 40 years 11 mons 30 days 23:00:00
>> (1 row)
>
> Not for me --- I get "41 years" for that case. Since 7.4 depends on the
> OS' timezone code, this is presumably OS-dependent. I'm using Fedora
> Core 3, which has ... hmm ...
>
> $ rpm -qf /usr/share/zoneinfo/America/Buenos_Aires
> tzdata-2005f-1.fc3
>
> ... a pretty recent zoneinfo package. What's yours?
I tested on a couple of FreeBSD 4.10 (approximately) builds, from May and
September last year. The original poster was on Linux I believe.
Looking at the definition of America/Buenos_Aires, which is exactly the
same in my FreeBSD sources and in the zoneinfo source supplied in pg 8.0.1,
it looks as though Argentina did indeed change timezones in 1969, so the
actual elapsed time between '2005-05-05 00:00:00' and '1964-05-05 00:00:00'
in that timezone is in fact 14974 days 23 hours.
Looking more closely, the significant thing seems to be that neither of my
7.4 servers is on 7.4.7, and this seems to have been fixed there (in response
to bug 1331).
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
From | Date | Subject | |
---|---|---|---|
Next Message | Mike G. | 2005-04-29 16:35:09 | Re: BUG #1638: ODBC driver problem |
Previous Message | Vig Sandor | 2005-04-29 15:31:02 | BUG #1638: ODBC driver problem |