Ubuntu – timezone setup

By default, the time and date of the new server is taken from the time zone, which usually corresponds to the country in which this server is located. At the same time, the server can be designed to operate a site in another country. As a result, the time on the server does not match the current time for most users.

Basic commands

Check the date on the server:

Check the current timezone on the server:


Local time: Thu 2020eleven26 21:23:56 CET
Universal time: Th 2020eleven26 20:23:56 UTC
RTC time: Thu 2020eleven26 20:23:57
Time zone: Europe/Amsterdam (CET, +0100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

The time zone is set using a symbolic link. Check which symlink is now:


/etc/localtime –> /usr/share/zoneinfo/Europe/Amsterdam

Changing the date and time on the server

Let’s remove the symlink:

Let’s create a new one for the Moscow time zone:

sudo ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime

Let’s reboot the server:

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *