This commit is contained in:
46
Docs/Linux更改时区为24小时.md
Normal file
46
Docs/Linux更改时区为24小时.md
Normal file
@@ -0,0 +1,46 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# 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
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user