2025-03-14 21:59:59 -06:00
|
|
|
# timedatectl
|
|
|
|
|
|
|
|
|
|
> Control the system time and date.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://www.freedesktop.org/software/systemd/man/timedatectl.html>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Check the current system clock time:
|
|
|
|
|
|
|
|
|
|
`timedatectl`
|
|
|
|
|
|
|
|
|
|
- Set the local time of the system clock directly:
|
|
|
|
|
|
|
|
|
|
`timedatectl set-time "{{yyyy-MM-dd hh:mm:ss}}"`
|
|
|
|
|
|
|
|
|
|
- List available timezones:
|
|
|
|
|
|
|
|
|
|
`timedatectl list-timezones`
|
|
|
|
|
|
|
|
|
|
- Set the system timezone:
|
|
|
|
|
|
|
|
|
|
`timedatectl set-timezone {{timezone}}`
|
|
|
|
|
|
|
|
|
|
- Enable Network Time Protocol (NTP) synchronization:
|
|
|
|
|
|
|
|
|
|
`timedatectl set-ntp on`
|
|
|
|
|
|
|
|
|
|
- Change the hardware clock time standard to localtime:
|
|
|
|
|
|
|
|
|
|
`timedatectl set-local-rtc 1`
|