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

47 lines
627 B
Markdown

> 本文作者:丁辉
# Linux更改时区为24小时
1. 首先更改时区
```bash
rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
```
2. 更改时区为24小时
- Centos 更改时区为24小时
```bash
vi /etc/locale.conf
```
内容如下
```bash
LANG="zh_CN.UTF-8"
# LANG="en_US.UTF-8"
```
- Ubuntu 更改时区为24小时
```bash
vi /etc/default/locale
```
内容如下
```bash
LANG="zh_CN.UTF-8"
# LANG="en_US.UTF-8"
```
3. 重启服务器完成
```bash
reboot
```