2016-01-03 15:45:57 +03:00
|
|
|
# timedatectl
|
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
> Control the system time and date.
|
2016-01-03 15:45:57 +03:00
|
|
|
|
2018-11-21 12:20:43 +03:00
|
|
|
- Check the current system clock time:
|
2016-01-03 15:45:57 +03:00
|
|
|
|
|
|
|
`timedatectl`
|
|
|
|
|
2018-11-21 12:20:43 +03:00
|
|
|
- Set the local time of the system clock directly:
|
2016-01-03 15:45:57 +03:00
|
|
|
|
|
|
|
`timedatectl set-time {{"yyyy-MM-dd hh:mm:ss"}}`
|
|
|
|
|
2018-11-21 12:20:43 +03:00
|
|
|
- List available timezones:
|
2016-01-03 15:45:57 +03:00
|
|
|
|
|
|
|
`timedatectl list-timezones`
|
|
|
|
|
2018-11-21 12:20:43 +03:00
|
|
|
- Set the system timezone:
|
2016-01-03 15:45:57 +03:00
|
|
|
|
|
|
|
`timedatectl set-timezone {{timezone}}`
|
2016-04-19 13:58:09 +03:00
|
|
|
|
2018-11-21 12:20:43 +03:00
|
|
|
- Enable Network Time Protocol (NTP) synchronization:
|
2016-04-19 13:58:09 +03:00
|
|
|
|
|
|
|
`timedatectl set-ntp on`
|