tldr/pages/linux/timedatectl.md

29 lines
559 B
Markdown
Raw Normal View History

2016-01-03 12:45:57 +00:00
# timedatectl
> Control the system time and date.
> More information: <https://manned.org/timedatectl>.
2016-01-03 12:45:57 +00:00
2018-11-21 09:20:43 +00:00
- Check the current system clock time:
2016-01-03 12:45:57 +00:00
`timedatectl`
2018-11-21 09:20:43 +00:00
- 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-03 12:45:57 +00:00
2018-11-21 09:20:43 +00:00
- List available timezones:
2016-01-03 12:45:57 +00:00
`timedatectl list-timezones`
2018-11-21 09:20:43 +00:00
- Set the system timezone:
2016-01-03 12:45:57 +00:00
`timedatectl set-timezone {{timezone}}`
2016-04-19 11:58:09 +01:00
2018-11-21 09:20:43 +00:00
- Enable Network Time Protocol (NTP) synchronization:
2016-04-19 11:58:09 +01:00
`timedatectl set-ntp on`
- Change the hardware clock time standard to localtime:
`timedatectl set-local-rtc 1`