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

Re: Comment on timezone and interval types

From: Stuart Bishop <stuart(at)stuartbishop(dot)net>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Comment on timezone and interval types
Date: 2004-10-29 07:22:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Hash: SHA1

Bruno Wolff III wrote:
| Recently there has been some discussion about attaching a timezone to
| a timestamp and some other discussion about including a 'day' part
| in the interval type. These two features impact each other, since
| if you add a 'day' to a timestamp the result can depend on what timezone
| the timestamp is supposed to be in. It probably makes more sense to use
| a timezone associated with the timestamp than say the timezone GUC or the
| fixed timezone UTC.

If you add a 'day' to a timestamp, it should be identical to adding 24
hours. Any other interpretation leads to all sorts of wierd ambiguities.
For example, what is '2am April 3rd 2004 US/Eastern + 1 day'? 2am on
April 4th 2004 didn't exist in that timezone because the clocks were put
forward and that hour skipped. If you round up to the nearest existant
time, you then have the issue that '2am April 3rd + 1 day == 3am Aril
3rd + 1 day'.

- --
Stuart Bishop <stuart(at)stuartbishop(dot)net>
Version: GnuPG v1.2.4 (GNU/Linux)


In response to


pgsql-general by date

Next:From: Karsten HilbertDate: 2004-10-29 07:22:42
Subject: Re: Question Regarding Locks
Previous:From: Stefan SturmDate: 2004-10-29 07:19:48
Subject: Error with 8.0.0 Beta4

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