Re: Best practices: Handling Daylight-saving time - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Best practices: Handling Daylight-saving time
Date
Msg-id 20050311162008.GB11319@svana.org
Whole thread Raw
In response to Best practices: Handling Daylight-saving time  (Együd Csaba <csegyud@vnet.hu>)
List pgsql-general
On Fri, Mar 11, 2005 at 03:25:28PM +0100, Együd Csaba wrote:
> Hi All,
> I'd like to ask your opininon about how to handle DST on an 7/24 system.
> Where should it be handled: on the server side or on the client side? And
> how could I (at all could I???) make it transparent?
>
> Or we must bow to the fact that twice a year there are two unusable hours?
> If it cannot be solved technically, than it is acceptable, but if there is a
> chance to do it, I'd like to try it.

I guess the same way computers have been handling it for years: store
time as "seconds since epoch" and let the user interface handle the
translation. Timezone files for anywhere in the world are available as
well as routines for converting seconds since epoch to localtime and
vice-versa.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: tony
Date:
Subject: Re: PostgreSQL still for Linux only?
Next
From: "ILove TheSpam"
Date:
Subject: Unique Indexes