• 首页
  • Qt文档
  • DTK文档
  • 玲珑文档
  • 统信UOS命令行更改时间

    统信UOS命令行时间管理设置 timedatectl 查看系统时区

    root@fanjichang-PC:/usr/share/fonts# timedatectl
                   Local time: 六 2021-05-08 15:01:27 CST
               Universal time: 六 2021-05-08 07:01:27 UTC
                     RTC time: 六 2021-05-08 15:01:25
                    Time zone: Asia/Shanghai (CST, +0800)
    System clock synchronized: no
                  NTP service: active
              RTC in local TZ: yes
    
    Warning: The system is configured to read the RTC time in the local time zone.
             This mode cannot 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'.
    

    timedatectl list-timezones 显示所有可用时区 sudo timedatectl set-ntp false 关闭网络同步时间服务 sudo timedatectl set-timezone America/New_York 设置系统时区

    当需要手动更改系统本地时间时,需要先手动关闭网络同步时间服务。关闭网络同步时间服务后,以设置系统时间为2021年5月8日10:11:50为例,命令如下

    sudo timedatectl set-time 2021-05-08 设置系统日期 sudo timedatectl set-time 10:11:50 设置系统时间