#!/usr/bin/env python
#encoding="utf-8""""free use navicat & sqlyog"""import datetimefrom dateutil import parserif __name__=="__main__": import sys,os if len(sys.argv)>1: import urllib2 r=urllib2.urlopen("http://www.london2012.com/") t=r.headers.dict["date"] print t dt=parser.parse(t) dt=dt+datetime.timedelta(hours=8)//chage gmt datetime to gmt+8 area time print "%s-%s-%s %s:%s:%s"%(dt.year,dt.month,dt.day,dt.hour,dt.minute,dt.second) os.system("date %s-%s-%s"%(dt.year,dt.month,dt.day)) os.system("time %s:%s:%s"%(dt.hour,dt.minute,dt.second)) print "datetime back to normal %s"%datetime.datetime.now() else: os.system("date 2012-03-20") print "this is only for software expired used" print "datetime change to %s"%datetime.datetime.now()