Files
Linux/Docs/Linux更改时区为24小时.md
offends 6165fb97a5
All checks were successful
continuous-integration/drone Build is passing
first commit
2025-12-13 17:57:17 +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