Re: Oracle dates and timezones

From: Paul Eggert <eggert_at_twinsun.com>
Date: 1996/03/29
Message-ID: <4ji2a4$g24_at_shade.twinsun.com>#1/1


Austin Moseley <\"moseba_at_audv55.aud.alcatel.com'> writes:

> Save [times] in GMT.

Yes. This is the only way to go.

> Then, Have a global-enterprise-wide time table:

Shouldn't it be the client's responsibility to convert to and from GMT? If the client software is reasonable (e.g. it's using the Olson time zone implementation, used by Sun, SCO, etc.) then it'll do the right thing already. If not, client software developers can port the Olson code and tables (which are free -- see ftp://elsie.nci.nih.gov/pub/tz*).

> Then,wherever you save a date, save it as GMT, providing a
> stored procedure to get the local time given GMT and the time-id,
> and a stored procedure to save it as GMT given the time-id and
> local time.

You've got the right idea, but the details aren't quite right. E.g. you can't unambiguously convert localtime+timeid to GMT, since localtime typically repeats for an hour in the fall.

Again, I think you'll have better luck using a client timezone library than trying to reinvent the wheel in the database; handling timezones correctly is a littler harder than it sounds. Received on Fri Mar 29 1996 - 00:00:00 CET

Original text of this message