Re: BUG #1993: Adding/subtracting negative time intervals

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Fuhr <mike(at)fuhr(dot)org>, Michael Glaesemann <grzm(at)myrealbox(dot)com>, Russell Smith <mr-russ(at)pws(dot)com(dot)au>, pgsql-bugs(at)postgresql(dot)org, Nicholas <hb(at)x256(dot)com>
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Date: 2005-10-26 04:35:44
Message-ID: 435F07A0.9050103@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

>> test=> select
>> test-> ('2005-10-30 13:22:00-05'::timestamptz -
>> test(> '2005-10-29 13:22:00-04'::timestamptz);
>> ?column?
>> ----------
>> 25:00:00
>> (1 row)
>
>
> Is that actually the correct answer?
>
> Disregarding daylight savings, there is 25hrs between them. Once
> daylight savings is taken into account there should be 24 or 26 hours
> between them (southern/northern hemisphere respectively).

the whole DST thing falls apart when you deal with places that don't
respect it... arizona (except the navajo nation), for instance....

it would be impossible to calculate the 'correct' answer without knowing
the exact location...

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-10-26 04:38:06 Re: BUG #1993: Adding/subtracting negative time intervals
Previous Message Klint Gore 2005-10-26 04:28:58 Re: BUG #1993: Adding/subtracting negative time intervals

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-10-26 04:38:06 Re: BUG #1993: Adding/subtracting negative time intervals
Previous Message Robert Treat 2005-10-26 04:34:19 pidfile location missing after restarting crashed server in 8.1