Re: Handling Daylight Savings

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Frank Bax <fbax(at)sympatico(dot)ca>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Handling Daylight Savings
Date: 2005-08-04 21:35:57
Message-ID: 20050804213557.GA90357@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Aug 04, 2005 at 05:04:50PM -0400, Frank Bax wrote:
> How is the actual date of change handled for each spring/fall change? Is
> the "timezone database" configurable by year? What happens if proposed
> changes to DST effective dates in North America are adopted?

Each timezone file has entries for each year, showing when DST
changes take effect. On some systems you can use the "zdump"
command to see this information. For example:

% zdump -v EST5EDT | grep 2005
EST5EDT Sun Apr 3 06:59:59 2005 UTC = Sun Apr 3 01:59:59 2005 EST isdst=0 gmtoff=-18000
EST5EDT Sun Apr 3 07:00:00 2005 UTC = Sun Apr 3 03:00:00 2005 EDT isdst=1 gmtoff=-14400
EST5EDT Sun Oct 30 05:59:59 2005 UTC = Sun Oct 30 01:59:59 2005 EDT isdst=1 gmtoff=-14400
EST5EDT Sun Oct 30 06:00:00 2005 UTC = Sun Oct 30 01:00:00 2005 EST isdst=0 gmtoff=-18000

If the rules change then the timezone files should be updated.
According to the PostgreSQL source code, its timezone database is
adapted from the library at the following site:

ftp://elsie.nci.nih.gov/pub/

Presumably new releases of PostgreSQL will be kept reasonably
current. As for how the operating system's timezone database is
managed, that depends on the vendor and on whether the system
administrator is keeping up with such things.

--
Michael Fuhr

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Gnanavel S 2005-08-05 04:04:01 Re: change varchar(10) to varchar()
Previous Message Frank Bax 2005-08-04 21:04:50 Re: Handling Daylight Savings