Recompile time zone data
From PostgreSQL Forums Wiki
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:
- Pull down the source code for your version of the database from http://www.postgresql.org/, store it in /tmp.
- Pull down the tzdata files from ftp://elsie.nci.nih.gov/pub/, store it in /tmp.
$ 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.
