Changing the timezone of your Debian Machine

If you want to change the time zone of your debian machine use the /usr/bin/tzselect command or you can typre “tzselect” in your shell prompt.

This command should prompt like below screen

Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.

Select your Continent in this example I have selected 8 and press enter then you should be able to see the screen like below

Please select a country.
1) Aaland Islands           24) Lithuania
2) Albania                    25) Luxembourg
3) Andorra                   26) Macedonia
4) Austria                    27) Malta
5) Belarus                    28) Moldova
6) Belgium                   29) Monaco
7) Bosnia & Herzegovina 30) Netherlands
8) Britain (UK)              31) Norway
9) Bulgaria                   32) Poland
10) Croatia                  33) Portugal
11) Czech Republic        34) Romania
12) Denmark                35) Russia
13) Estonia                  36) San Marino
14) Finland                  37) Serbia and Montenegro
15) France                  38) Slovakia
16) Germany               39) Slovenia
17) Gibraltar                40) Spain
18) Greece                  41) Sweden
19) Hungary                42) Switzerland
20) Ireland                  43) Turkey
21) Italy                     44) Ukraine
22) Latvia                   45) Vatican City
23) Liechtenstein

For this example I have am choosing 8 and press enter you should be able to see the screen like this.

Please select one of the following time zone regions.
1) Great Britain
2) Northern Ireland

Here select 1 and press enter you should be able to see the following screen

The following information has been given:

Britain (UK)
Great Britain

Therefore TZ='Europe/London' will be used.
Local time is now: Wed Nov 9 11:03:17 GMT 2005.
Universal Time is now: Wed Nov 9 11:03:17 UTC 2005.
Is the above information OK?
1) Yes
2) No

Enter 1 and press enter here that’s all about the changing time.

Keeping your Debian machine clock current automatically

There are several packages related to NTP in the Debian archive, probably the simplest is the client “ntpdate”
Install it by running, as root, apt-get install ntpdate, and your machine will be automatically setup to sync time from the public servers which have the name
If you wish to change them to point to an internal time server of your own you can adjust this by editting the file /etc/default/ntpdate.