pantz.org banner
Compiling and updating timezone data
Posted on 03-13-2007 02:56:00 UTC | Updated on 03-13-2007 02:56:00 UTC
Section: /software/zdump/ | Permanent Link

You can compile timezone info files by hand if need be for Linux, OpenBSD, Solaris, or Irix. I have done this successfully on linux distros as far back as 3 years old, OpenBSD 3.8 and above, Solaris 6,7,8, and Irix 6.5. The main idea is getting the basic timezone files from NIH and compiling them for your os (using zic). Then copying them over the old files. I would backup the old timezone dir's before copying in the new ones. Just in case.

Note: for Irix to work you have to edit the /etc/TIMEZONE and enter TZ=:EST5EDT ( notice the ":" ). This tells Irix to only pay attention to the timezone file. The example was done for Eastern time zone. To compile the time zone files you get from nih.org (below) you can just run

zic northamerica

Instead of the zic below to compile them. Irix's time zone files are in /usr/lib/locale/TZ. To check it for 2007 run

zdump -v /usr/lib/locale/TZ/EST5EDT | grep zdump 2007

For Solaris put your timezone in /etc/TIMEZONE and enter TZ=US/Eastern (for EST time zone). Solaris keeps it's timezone files in /usr/share/lib/. To check it run

zdump -v /usr/share/lib /zoneinfo/US/Eastern |grep 2007

The following example was done on OpenBSD 3.8 for northamerica. The zonefiles are being updated because of the US changing it's daylight savings time start and end dates. Note the dates have changed from the old zone file to the new zone file when they are listed.

Check the current date setting for 2007

zdump -v /etc/localtime |grep 2007

/etc/localtime  Sun Apr  1 06:59:59 2007 UTC = Sun Apr  1 01:59:59 2007 EST isdst=0
/etc/localtime  Sun Apr  1 07:00:00 2007 UTC = Sun Apr  1 03:00:00 2007 EDT isdst=1
/etc/localtime  Sun Oct 28 05:59:59 2007 UTC = Sun Oct 28 01:59:59 2007 EDT isdst=1
/etc/localtime  Sun Oct 28 06:00:00 2007 UTC = Sun Oct 28 01:00:00 2007 EST isdst=0

cd /tmp/
mkdir zone
cd zone
wget ftp://elsie.nci.nih.gov/pub/tzdata2007c.tar.gz
tar -xzvf tzdata2007c.tar.gz
zic -d zoneinfo northamerica
cd zoneinfo
cp -r * /usr/share/zoneinfo/
zdump -v /etc/localtime | grep 2007

/etc/localtime  Sun Mar 11 06:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 ESTisdst=0
/etc/localtime  Sun Mar 11 07:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 EDTisdst=1
/etc/localtime  Sun Nov  4 05:59:59 2007 UTC = Sun Nov  4 01:59:59 2007 EDTisdst=1
/etc/localtime  Sun Nov  4 06:00:00 2007 UTC = Sun Nov  4 01:00:00 2007 ESTisdst=0

Reboot the machine to make sure all programs startup using the new TZ data.

Reddit!

Related stories


RSS Feed RSS feed logo

About


3com

3ware

alsa

alsactl

alsamixer

amd

android

apache

areca

arm

ati

auditd

awk

badblocks

bash

bind

bios

bonnie

cable

carp

cat5

cdrom

cellphone

centos

chart

chrome

chromebook

cifs

cisco

cloudera

comcast

commands

comodo

compiz-fusion

corsair

cpufreq

cpufrequtils

cpuspeed

cron

crontab

crossover

cu

cups

cvs

database

dbus

dd

dd_rescue

ddclient

debian

decimal

dhclient

dhcp

diagnostic

diskexplorer

disks

dkim

dns

dos

dovecot

drac

dsniff

dvdauthor

e-mail

echo

editor

emerald

ethernet

expect

ext3

ext4

fat32

fedora

fetchmail

fiber

filesystems

firefox

firewall

flac

flexlm

floppy

flowtools

fonts

format

freebsd

ftp

gdm

gmail

gnome

google

greasemonkey

greylisting

growisofs

grub

hacking

hadoop

harddrive

hba

hex

hfsc

html

html5

http

https

hulu

idl

ie

ilo

intel

ios

iperf

ipmi

iptables

ipv6

irix

javascript

kde

kernel

kickstart

kmail

kprinter

krecord

kubuntu

kvm

lame

ldap

linux

logfile

lp

lpq

lpr

maradns

matlab

memory

mencoder

mhdd

mkinitrd

mkisofs

moinmoin

motherboard

mouse

movemail

mplayer

multitail

mutt

myodbc

mysql

mythtv

nagios

nameserver

netflix

netflow

nginx

nic

ntfs

ntp

nvidia

odbc

openbsd

openntpd

openoffice

openssh

openssl

openvpn

opteron

parted

partimage

patch

perl

pf

pfflowd

pfsync

photorec

php

pop3

pop3s

ports

postfix

power

procmail

proftpd

proxy

pulseaudio

putty

pxe

python

qemu

r-studio

raid

recovery

redhat

router

rpc

rsync

ruby

saltstack

samba

schedule

screen

scsi

seagate

seatools

sed

sendmail

sgi

shell

siw

smtp

snort

solaris

soundcard

sox

spam

spamd

spf

sql

sqlite

squid

srs

ssh

ssh.com

ssl

su

subnet

subversion

sudo

sun

supermicro

switches

symbols

syslinux

syslog

systemrescuecd

t1

tcpip

tcpwrappers

telnet

terminal

testdisk

tftp

thttpd

thunderbird

timezone

ting

tls

tools

tr

trac

tuning

tunnel

ubuntu

unbound

vi

vpn

wget

wiki

windows

windowsxp

wireless

wpa_supplicant

x

xauth

xfree86

xfs

xinearama

xmms

youtube

zdump

zeromq

zic

zlib