Re: Best practices: Handling Daylight-saving time

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Best practices: Handling Daylight-saving time
Date: 2005-03-12 16:44:52
Message-ID: 20050312174452.I565@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 11, 2005 at 01:43:21PM -0500, Randall Nortman wrote:

> As others have mentioned, store timestamps on the server in UTC,

1) As long as I store them as <timestamp with time zone> I should
not need to care what they are stored as on the backend as
long as I provide the proper timezone for the client location.
Correct ?

2) If I then retrieve them as "... at time zone <...>" I will get
the equivalent time in the time zone of the retrieving client.
The same could be be achieved with "set timezone" per session.
Correct ?

3) If I retrieve them without "at time zone" I will get them with
the time zone that was stored in the first place, right ?

4) I could be wrong on 3, it might be that I then get
times at the time zone the machine running PostgreSQL is set
to - still the correct point in time but not the *source* time
zone.

GnuMed operates on the assumptions that 1 and 2 hold true. It
does not bet itself on 3. Are we safe ?

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-03-12 16:57:16 Re: postgres 8 settings
Previous Message Christian Kratzer 2005-03-12 16:39:38 Re: partitionning