Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Time zone definitions to config files


  • From: "Joachim Wieland" <joe(at)mcknight(dot)de>
  • To: pgsql-patches(at)postgresql(dot)org
  • Subject: Time zone definitions to config files
  • Date: Thu, 13 Jul 2006 22:33:51 +0200
  • Message-id: <0ec410b2771836780922c5c75c2159d1@> <text/plain>

Here's the patch that generalizes the australian_timezones hack by moving the
compiled-in time zone definitions into a text file. The text file to use is
chosen via a guc.

The patch comes with `template' files and `set' files. The template files
contain all time zones that I could find, i.e. are autogenerated from zic and
later I added other time zones manually like those from the old pgsql source.
The set files are what you can then specify in the configuration. The default
set is called `Default' and should work for like 90% of the world. A guc
parameter called `timezone_abbreviations' specifies which set to load.
Similar

to setting `australian_timezones = true' today, an Australian would set
`timezone_abbreviations = Australia' and the set called `Australia' gets
loaded.  Basically this file includes the default set and overrides the time
zone information from there with the conflicting Australian time zones. This
include/override feature makes it possible to keep the local sets really
small

and to ship almost everything in the default set. There is another set,
`India', that also includes the default set but then defines the `IST' time
zone differently (is defined to Israel time by default).

Sets get installed to share/timezone/tznames/sets/ and templates to
share/timezone/tznames/templates.
Anybody can think of better names?



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group