十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
#!/usr/bin/env python
#coding:utf-8
#Example:
#ntpdate -u 0.asia.pool.ntp.org 1.asia.pool.ntp.org 2.asia.pool.ntp.org 3.asia.pool.ntp.org cn.ntp.org.cn time.nuri.net
import os
command = ['ntpdate cn.ntp.org.cn',
'rm -rf /etc/localtime',
'ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime',
'hwclock -w',
"export TZ='Asia/Shanghai'",
'echo "export TZ=\'Asia/Shanghai\'" >> /root/.bashrc']
for com in command:
os.system(com)