2007年10月19日 星期五

change timezone in a linux system

/etc/localtime stores the default timezone of the host.

one can observe this file by
# zdump /etc/localtime

to change the default timezone, one can do
1. keep a copy of origirnal one
# cd /etc
# mv localtime localtime.orig

2. select the proper zone file. e.g.
# cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime

now, the default timezone is changed.

2 則留言:

Linux Worker 提到...

Linux 好像沒有zdumpm這個指令ㄟ, 是不是拼錯了啊

k2 提到...

thanks.
It should be read as
# zdump /etc/localtime