利用 curl -I 得到服务器时间,然后用python os.system 改写ubuntu 的系统时间和日期。
有点繁琐。
datetime.now()
参考URL
点击打开链接 http://blog.csdn.net/jgood/article/details/5457284
python第三方库推荐 - 通过ntplib在windows上同步时间
http://blog.csdn.net/handsomekang/article/details/10767633 这个没有测试。