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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: BUG #1993: Adding/subtracting negative time intervals
Дата
Msg-id 200510261231.j9QCVfs14622@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: BUG #1993: Adding/subtracting negative time intervals  (John R Pierce <pierce@hogranch.com>)
Список pgsql-bugs
John R Pierce wrote:
> >>    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...

Yes, I ran this in EST5EDT time, so the answer is correct for that
timezone.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andrew - Supernews
Дата:
Сообщение: Re: BUG #1993: Adding/subtracting negative time intervals
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #1993: Adding/subtracting negative time intervals