python 时区 修改linux时区

 

(venv) a@a:~/test/app$ timedatectl list-timezones | grep "hai"
Asia/Shanghai
(venv) a@a:~/test/app$ timedatectl set-timezone "Asia/Shanghai"
==== AUTHENTICATING FOR org.freedesktop.timedate1.set-timezone ====
Authentication is required to set the system timezone.
Authenticating as: a
Password:
==== AUTHENTICATION COMPLETE ====
(venv) a@a:~/test/app$ timedatectl
Local time: Thu 2024-07-11 19:45:27 CST
Universal time: Thu 2024-07-11 11:45:27 UTC
RTC time: Thu 2024-07-11 11:45:27
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
(venv) a@a:~/test/app$

 

Python中的时区处理  http://tech.glowing.com/cn/dealing-with-timezone-in-python/

 Python时区设置方法与pytz查询时区教程_python_脚本之家  http://www.jb51.net/article/43809.htm

 

posted @ 2018-05-09 10:36  papering  阅读(164)  评论(0编辑  收藏  举报