Thread: DST and potential changes thereto

DST and potential changes thereto

From
Steve Crawford
Date:
With the U.S. Government poised to tinker with Daylight Saving Time, I
have a couple questions.

0) Does PG rely on system-level TZ info or will specific updates to PG
be required?  I'm interested in *nix but the Windows folks are
probably interested, too.

1) However a change is implemented, what will be the effect on queries
for historical data? Will the localtime be correct for all dates
whether before or after the change?

Perhaps we will still dodge this bullet. But with the House and Senate
recently reaching an agreement, the change is appearing ever more
likely.

Cheers,
Steve


Re: DST and potential changes thereto

From
Martijn van Oosterhout
Date:
Timezones are implemented using timezones files which contain info
about daylight savings since forever. When/if the change happens a new
set of timezone files should be released. Copy over the one for your
area and you're fine.

Postgresql may use it's own system, I think it depends on the version.
But the same principle applies.

This I what I did when Sydney moved the daylight savings for the
Olympics. I got the file and copied it to all my linux machines. OTOH
the windows machines I never worked out how to do it...

Hope this helps,

On Fri, Jul 22, 2005 at 10:44:49AM -0700, Steve Crawford wrote:
> With the U.S. Government poised to tinker with Daylight Saving Time, I
> have a couple questions.
>
> 0) Does PG rely on system-level TZ info or will specific updates to PG
> be required?  I'm interested in *nix but the Windows folks are
> probably interested, too.
>
> 1) However a change is implemented, what will be the effect on queries
> for historical data? Will the localtime be correct for all dates
> whether before or after the change?
>
> Perhaps we will still dodge this bullet. But with the House and Senate
> recently reaching an agreement, the change is appearing ever more
> likely.
>
> Cheers,
> Steve
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
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

Re: DST and potential changes thereto

From
"Magnus Hagander"
Date:
> With the U.S. Government poised to tinker with Daylight
> Saving Time, I have a couple questions.
>
> 0) Does PG rely on system-level TZ info or will specific
> updates to PG be required?  I'm interested in *nix but the
> Windows folks are probably interested, too.

Pre-8.0 relies on the system-level TZ info. So you'd need an OS update.

8.0 and later comes with it's own timezone database (which is synced
from upstream, it's not locally created). So you'd need a PostgreSQL
update for this (you could just update the timezone files and not the
rest if you wanted to, but I would assume a new minor postgresql version
wluld be put out)


> 1) However a change is implemented, what will be the effect
> on queries for historical data? Will the localtime be correct
> for all dates whether before or after the change?

The timezone database as imported into 8.0, and as present on many
(most?) Unix systems already handles the fact that DST rules have
changed over time. It will apply the timezone rule that was valid at the
time in question.


> Perhaps we will still dodge this bullet. But with the House
> and Senate recently reaching an agreement, the change is
> appearing ever more likely.

This happens all the time around the world.  It's just been a while in
the US :-)
(For example, not too many years ago a lot of countries in europe
changed their rules to be same across the EU)

//Magnus