![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
With the same query the age function is giving me two results, one as it should be (34 years) and the other one is off by 1 hour, |
#3
| |||
| |||
|
|
The following bug has been logged online: Bug reference: 1637 Logged by: J.Simon Goodall Email address: simon (AT) EstanciaViamonte (DOT) com PostgreSQL version: 7.4.2 Operating system: Linux Description: age() function is giving different results Details: With the same query the age function is giving me two results, one as it should be (34 years) and the other one is off by 1 hour, the query is a single one so the results I asume should be the same. I have tried finding the age(,) function in the source but had no luck. |
#4
| |||
| |||
|
|
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) |
#5
| |||
| |||
|
|
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? |
#6
| |||
| |||
|
|
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). |
![]() |
| Thread Tools | |
| Display Modes | |
| |