Files
Linux/Docs/Linux更改时区为24小时.md
offends cee91802b3
Some checks failed
continuous-integration/drone Build is failing
synchronization
2025-08-25 15:57:40 +08:00

627 B

本文作者:丁辉

Linux更改时区为24小时

  1. 首先更改时区

    rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    
  2. 更改时区为24小时

    • Centos 更改时区为24小时

      vi /etc/locale.conf
      

      内容如下

      LANG="zh_CN.UTF-8"
      # LANG="en_US.UTF-8"
      
    • Ubuntu 更改时区为24小时

      vi /etc/default/locale
      

      内容如下

      LANG="zh_CN.UTF-8"
      # LANG="en_US.UTF-8"
      
  3. 重启服务器完成

    reboot