Re: Best practices: Handling Daylight-saving time

Поиск
Список
Период
Сортировка
От Együd Csaba (Freemail)
Тема Re: Best practices: Handling Daylight-saving time
Дата
Msg-id 0IDH006KHPWDYP@mail.vnet.hu
обсуждение исходный текст
Ответ на Re: Best practices: Handling Daylight-saving time  (Christopher Browne <cbbrowne@acm.org>)
Список 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@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Christopher Browne
Sent: Thursday, March 17, 2005 6:23 AM
To: pgsql-general@postgresql.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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Katsuhiko Okano
Дата:
Сообщение: Re: Object like pg_class.relkind = 's' or 'c' have on-disk
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: help with plpgsql function called by trigger