2016-01-03 12:45:57 +00:00
|
|
|
# timedatectl
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Control the system time and date.
|
2016-01-03 12:45:57 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- To check the current system clock time:
|
2016-01-03 12:45:57 +00:00
|
|
|
|
|
|
|
`timedatectl`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- To set the local time of the system clock directly:
|
2016-01-03 12:45:57 +00:00
|
|
|
|
|
|
|
`timedatectl set-time {{"yyyy-MM-dd hh:mm:ss"}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- To list available timezones:
|
2016-01-03 12:45:57 +00:00
|
|
|
|
|
|
|
`timedatectl list-timezones`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- To change timezones:
|
2016-01-03 12:45:57 +00:00
|
|
|
|
|
|
|
`timedatectl set-timezone {{timezone}}`
|
2016-04-19 11:58:09 +01:00
|
|
|
|
|
|
|
- To enable Network Time Protocol (NTP) syncing:
|
|
|
|
|
|
|
|
`timedatectl set-ntp on`
|