Search Postgresql Archives

Re: unexpected behavior in combining timestamps with times zone and intervals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Charles Seaton <cseaton@xxxxxxxxxxx> writes:
> Thanks for your response. I am wondering whether it is postgres 8.2.5 
> that resolves the problem or your time zone setting.

This behavior changed in PG 8.1.  Per the release notes:

* Add a separate day field to type interval so a one day interval can be
  distinguished from a 24 hour interval (Michael Glaesemann)

Days that contain a daylight saving time adjustment are not 24 hours
long, but typically 23 or 25 hours. This change creates a conceptual
distinction between intervals of "so many days" and intervals of "so
many hours". Adding 1 day to a timestamp now gives the same local time
on the next day even if a daylight saving time adjustment occurs
between, whereas adding 24 hours will give a different local time when
this happens. For example, under US DST rules:

        '2005-04-03 00:00:00-05' + '1 day' = '2005-04-04 00:00:00-04'
        '2005-04-03 00:00:00-05' + '24 hours' = '2005-04-04 01:00:00-04'

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux