Re: timestamp with time zone a la sql99

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: timestamp with time zone a la sql99
Date: 2004-10-25 16:42:38
Message-ID: 200410250942.38212.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom,

> As far as I can tell, Dennis is planning slavish adherence to the spec,
> which will mean that the datatype is unable to cope effectively with
> daylight-savings issues.  So I'm unconvinced that it will be very
> helpful to you for remembering local time in addition to true
> (universal) time.

As somebody who codes calendar apps, I have to say that I have yet to see an
implementation of time zones which is at all useful for this purpose,
including the current implementation. My calendar apps on PostgreSQL 7.4
use "timestamp without time zone" and keep the time zone in a seperate field.

The reason is simple: our current implementation, which does include DST,
does not include any provision for the exceptions to DST -- such as Arizona
-- or for the difference between "1 day" and "24 hours". (Try adding "30
days" to "2004-10-05 10:00 PDT", you'll see what I mean). Nor do I see a
way out of this without raising the complexity, and configurability, level of
timezones significantly.

So if we're going to be broken (at least from the perspective of calendar
applications) we might as well be broken in a spec-compliant way.

--
Josh Berkus
Aglio Database Solutions
San Francisco

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-10-25 16:53:20 Re: Using ALTER TABLESPACE in pg_dump
Previous Message Reini Urban 2004-10-25 16:26:50 Re: rmtree() failure on Windows