Published: 25. 1. 2013   Category: GNU/Linux

Time zones in GNU/Linux, system-config-date-tui, timeconfig

There is text mode interface for time zone selection on CentOS 5.x, actually even in this version it is deprecated, and from version CentOS 6.x there is only GUI version of system-config-date. I separated the TUI version of it, and you can get here (tested in CentOS 6.3):

Installation and usage

Download and install packages:

rpm -ihv timeconfig-1.0-2.noarch.rpm
rpm -ihv rhpl*.rpm

The package provides two commands for calling same python script: system-config-date-tui and timeconfig.

Other options?

GNU/Linux reads the global timezone configuration from file /etc/localtime, which is part of glibc. Usually it is a copy of some file stored in /usr/share/zoneinfo/ (provided by tzdata package).

You can copy specified file as root, e. g. for Europe/Prague:

cp /usr/share/zoneinfo/Europe/Prague /etc/localtime

The glibc-common also provides utility tzselect for interactive selection of time zone.

There is also environment variable $TZ, which can be used for overriding /etc/localtime settings. The TZ should be set according to tz database time zones, e.g.:

$ TZ="Europe/Prague" date
Fri Jan 25 14:20:15 CET 2013
$ TZ="Pacific/Honolulu" date
Fri Jan 25 03:20:30 HST 2013