From: | Együd Csaba (Freemail) <csegyud(at)freemail(dot)hu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Best practices: Handling Daylight-saving time |
Date: | 2005-03-17 09:47:41 |
Message-ID: | 0IDH006KHPWDYP@mail.vnet.hu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
After a few days of working on the problem I can state that - IMHO - this is
the best way:
Using UTC (or any other timezone) with NO DST (this is the most important)
is the only reliable way to store continous data.
On the client we can convert the server time easily to local time. Even if
the server uses a different timezone to UTC/GMT. The client can take into
account the result of (select extract('timezone' from CURRENT_TIMESTAMP))
and correct the local time with that. The opposite direction (converting
local time to server time) is as simple as the other.
Just a small problem is to take into account the DSTBias. This means that
you have to increment (or decrement) the amount of hours to add by the
DSTBias. Thats all.
Thank you very much all of you to open my eyes!
Best Regrds,
-- Csaba
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Christopher Browne
Sent: Thursday, March 17, 2005 6:23 AM
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Best practices: Handling Daylight-saving time
Don't use DST.
Use GMT/UTC.
That makes the issue go away.
--
(reverse (concatenate 'string "gro.mca" "@" "enworbbc"))
http://cbbrowne.com/info/slony.html
Signs of a Klingon Programmer #2: "You question the worthiness of my code?
I should kill you where you stand!"
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 2005.03.15.
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 2005.03.15.
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2005-03-17 09:51:53 | Re: help with plpgsql function called by trigger |
Previous Message | Katsuhiko Okano | 2005-03-17 09:37:09 | Re: Object like pg_class.relkind = 's' or 'c' have on-disk |