-h --help Show this help --version Show package version --adjust-system-clock Adjust system clock when changing local RTC mode --no-pager Do not pipe output into a pager -P --privileged Acquire privileges before execution --no-ask-password Do not prompt for password -H --host=[USER@]HOST Operate on remote host
Commands: status Show current time settings set-time TIME Set system time set-timezone ZONE Set system timezone list-timezones Show known timezones set-local-rtc BOOL Control whether RTC isin local time set-ntp BOOL Control whether NTP is enabled
[root@localhost ~]# chronyc chrony version 2.1.1 Copyright (C) 1997-2003, 2007, 2009-2015 Richard P. Curnow and others chrony comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public License version 2 for details.
chronyc> help Commands: accheck <address> : Check whether NTP access is allowed to <address> activity : Check how many NTP sources are online/offline add peer <address> ... : Add a new NTP peer add server <address> ... : Add a new NTP server allow [<subnet-addr>] : Allow NTP access to that subnet as a default allow all [<subnet-addr>] : Allow NTP access to that subnet and all children burst <n-good>/<n-max> [<mask>/<masked-address>] : Start a rapid set of measurements clients : Report on clients that have accessed the server cmdaccheck <address> : Check whether command access is allowed to <address> cmdallow [<subnet-addr>] : Allow command access to that subnet as a default cmdallow all [<subnet-addr>] : Allow command access to that subnet and all children cmddeny [<subnet-addr>] : Deny command access to that subnet as a default cmddeny all [<subnet-addr>] : Deny command access to that subnet and all children cyclelogs : Close and re-open logs files delete <address> : Remove an NTP server or peer deny [<subnet-addr>] : Deny NTP access to that subnet as a default deny all [<subnet-addr>] : Deny NTP access to that subnet and all children dump : Dump all measurements to save files local off : Disable server capability for unsynchronised clock local stratum <stratum> : Enable server capability for unsynchronised clock makestep [<threshold><updates>] : Correct clock by stepping manual off|on|reset : Disable/enable/reset settime command and statistics manual list : Show previous settime entries maxdelay <address><new-max-delay> : Modify maximum round-trip valid sample delay for source maxdelayratio <address><new-max-ratio> : Modify max round-trip delay ratio for source maxdelaydevratio <address><new-max-ratio> : Modify max round-trip delay dev ratio for source maxpoll <address><new-maxpoll> : Modify maximum polling interval of source maxupdateskew <new-max-skew> : Modify maximum skew for a clock frequency update to be made minpoll <address><new-minpoll> : Modify minimum polling interval of source minstratum <address><new-min-stratum> : Modify minimum stratum of source offline [<mask>/<masked-address>] : Set sources in subnet to offline status online [<mask>/<masked-address>] : Set sources in subnet to online status password [<new-password>] : Set command authentication password polltarget <address><new-poll-target> : Modify poll target of source reselect : Reselect synchronisation source rtcdata : Print current RTC performance parameters settime <date/time (e.g. Nov 21, 1997 16:30:05 or 16:30:05)> : Manually set the daemon time smoothing : Display current time smoothing state smoothtime reset|activate : Reset/activate time smoothing sources [-v] : Display information about current sources sourcestats [-v] : Display estimation information about current sources tracking : Display system time information trimrtc : Correct RTC relative to system clock waitsync [max-tries [max-correction [max-skew]]] : Wait until synchronised writertc : Save RTC parameters to file
authhash <name>: Set command authentication hash function dns -n|+n : Disable/enable resolving IP addresses to hostnames dns -4|-6|-46 : Resolve hostnames only to IPv4/IPv6/both addresses timeout <milliseconds> : Set initial response timeout retries <n> : Set maximum number of retries exit|quit : Leave the program help : Generate this help
[root@localhost ~]# timedatectl set-local-rtc 1 [root@localhost ~]# timedatectl Local time: Thu 2016-05-2615:31:59 CST Universal time: Thu 2016-05-2607:31:59 UTC RTC time: Thu 2016-05-2615:31:59 Time zone: Asia/Shanghai (CST, +0800) NTP enabled: yes NTP synchronized: yes RTC in local TZ: yes DST active: n/a
Warning: The system is configured to read the RTC time in the local time zone. This mode can not be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'.