How to set the time zone and daylight savings in Debian Linux

published Apr 01, 2009 12:20   by admin ( last modified Apr 01, 2009 12:20 )

use

dpkg-reconfigure tzdata

as root if you are on Debian, or:

sudo dpkg-reconfigure tzdata

on Ubuntu. You will get to a GUI that works in a terminal, where you can set your location. Daylight savings will automatically be included.

webworks@host3:~$ date
Tue Mar 31 19:53:28 UTC 2009
user1@host3:~$ su -
Password:
host3:~# tzconfig
WARNING: the tzconfig command is deprecated, please use:
 dpkg-reconfigure tzdata
host3:~#
host3:~# dpkg-reconfigure tzdata
Current default timezone: 'Europe/Stockholm'
Local time is now:      Tue Mar 31 21:58:50 CEST 2009.
Universal Time is now:  Tue Mar 31 19:58:50 UTC 2009.
host3:~# date
Tue Mar 31 21:58:57 CEST 2009

tzselect only gives you a view of the time at a particular timezone. to change the timezone use "dpkg-reconfigure tzdata" instead


Läs mer: How to set time zone? [Archive] - Ubuntu Forums