Manage time in Linux
I recently installed Debian on a ThinkCentre M72e PC and accidentally selected the wrong time zone - Europe/London. Because of this, the system clock was an hour late.
To manage the clock, date and time zone settings on Linux, we use the timedatectl utility. With it, it is also possible to enable or disable the time synchronisation service.
In order to set the correct time zone, it is useful to know what time zones we have to choose from. Using the timedatectl list-timezone
command, the tool lists all available time zones.
timedatectl list-timezone | grep Warsaw
Europe/Warsaw
The correct name for the time zone in Poland is Europe/Warsaw. All I need to do was activate it:
timedatectl set-timezone Europe/Warsaw
Finally, I validated the settings using timedatectl
(as root):
timedatectl
Local time: Sat 2022-10-01 17:56:19 CEST
Universal time: Sat 2022-10-01 15:56:19 UTC
RTC time: Sat 2022-10-01 15:56:19
Time zone: Europe/Warsaw (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
That fixed my issue with incorrect time on the system.
There is an RSS feed for this blog.