Recompile time zone data

From PostgreSQL Forums Wiki

Jump to: navigation, search

Older versions of PostgreSQL may have outdated time zone data files, specifically 8.1.5 and earlier do not have the updated daylight savings time cut over for Canada. This procedure will show you how to recompile and install the latest time zone data files.

If you need to recompile your time zone data files for PostgreSQL then you should:

$ umask 022
$ cd /tmp
$ bzip2 -dc postgresql-8.1.5.tar.bz2 |tar xf -
$ cd postgresql-8.1.5
$ ./configure
$ cd src/port && make
$ cd ../../src/timezone && make zic
$ mkdir -p /tmp/tz/data /tmp/tz/timezone
$ mv zic /tmp/tz
$ cd /tmp/tz/data
$ gzip -dc /tmp/tzdata2006p.tar.gz |tar xf -
$ ../zic -d ../timezone africa antarctica asia australasia europe northamerica southamerica \
                        pacificnew etcetera factory backward systemv solar87 solar88 solar89
$ cd ../timezone
$ cp -rf --reply=yes . /usr/share/pgsql/timezone/
  • After following the procedure, restart the database.
Personal tools
advertisement