Linux Commands - timedatectl
by
Jeremy Canfield |
Updated: December 07 2020
| Linux Commands articles
The timedatectl command can be used to display and update a systems date and time. The timedatectl command with no options will display the systems date and time, like this.
~]# timedatectl
Local time: Mon 2020-12-07 06:51:29 CST
Universal time: Mon 2020-12-07 12:51:29 UTC
RTC time: Mon 2020-12-07 12:51:30
Time zone: America/Winnipeg (CST, -0600)
NTP enabled: n/a
NTP synchronized: no
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Sun 2020-11-01 01:59:59 CDT
Sun 2020-11-01 01:00:00 CST
Next DST change: DST begins (the clock jumps one hour forward) at
Sun 2021-03-14 01:59:59 CST
Sun 2021-03-14 03:00:00 CDT
The set-time option can be used to update the systems date and time.
timedatectl "2020-12-01 02:30:000"
/var/log/messages should contain an event showing that the systems date and time have been updated.
Dec 7 00:00:00 [localhost] systemd: Time has been changed
Dec 7 00:00:00 [localhost] systemd-timedated: Changed local time to Mon Dec 1 00:00:00 2020
Dec 7 02:47:00 [localhost] systemd-timedated: Changed local time to Mon Dec 1 02:30:00 2020
Did you find this article helpful?
If so, consider buying me a coffee over at