Skip site navigation (1) Skip section navigation (2)

Re: BUG #1637: age() function is giving different results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: andrew(at)supernews(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org, simon(at)EstanciaViamonte(dot)com
Subject: Re: BUG #1637: age() function is giving different results
Date: 2005-04-29 14:12:29
Message-ID: 5622.1114783949@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
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?

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Damir BijuklicDate: 2005-04-29 14:56:26
Subject: Win1250 database under linux
Previous:From: Michael FuhrDate: 2005-04-29 06:05:36
Subject: Re: BUG #1636: Foreign key referencing inherited table fails.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group