commands.sh

timedatectl

linux

Control the system time and date.

More info →

Examples (7)

Check the current system clock time

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

Show information about time synchronization (only available when using `systemd-timesyncd`)

timedatectl timesync-status

Change the hardware clock time standard to localtime

timedatectl set-local-rtc 1
made by @shridhargupta | data from tldr-pages