linux using a modified zone and the time timedatectl

Timedatectl can use the following common operations

1. View the current time / date / time zone: timedatectl or timedatectl status

2. View all available time zones: timedatectl list-timezones

3. Set zone: timedatectl set-timezone "Asia / Shanghai" or timedatectl set-timezone PRC

4. Set Time: timedatectl set-time HH: MM: SS

5. Set Date: timedatectl set-time YYYY-MM-DD

6. Set the date and time: timedatectl set-time "YYYY-MM-DD HH: MM: SS"

7. Set the hardware clock to local time: timedatectl set-local-rtc 1

8. set the hardware clock to UTC time: timedatectl set-local-rtc 0

9. Start NTP time synchronization (NTP service is enabled or Chrony Service): timedatectl set-ntp true

10. Disabling NTP Time Synchronization: timedatectl set-ntp false

Guess you like

Origin www.cnblogs.com/cocoqi/p/11458065.html