admin管理员组

文章数量:1642360

文章连接:https://blog.csdn/sxzlc/article/details/115792270

=======

扩展:

使用Linux的tzselect功能,查看各个洲都有哪些国家(地区)

https://blog.csdn/sxzlc/article/details/115792692

=======

 

1.查看当前时区

 

2.执行tzselect命令,

3.选择你的国家(地区)所在的洲(亚洲,输入4)

4.选择你的国家(地区)

中国 9

5.选择地区

北京1

6.确认

Yes 1

You can make this change permanent for yourself by appending the line
        TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:

7.用上面获得的【Asia/Shanghai】来修改时区

timedatectl set-timezone 'Asia/Shanghai'

===

需要使用管理者权限执行

8.再次查看时间,已经是当前时区的时间了

===

本文标签: 时区中国例子时间Linux