标签:class 时间戳 imp get targe range pytho time() now()
原文 http://blog.csdn.net/mzbqhbc12/article/details/60886154
import time,datetime def gettime(): for x in range(24): a = datetime.datetime.now().strftime("%Y-%m-%d")+" %2d:00:00"%x timeArray = time.strptime(a, "%Y-%m-%d %H:%M:%S") timeStamp = int(time.mktime(timeArray)) print(timeStamp) if __name__ == "__main__": gettime()
标签:class 时间戳 imp get targe range pytho time() now()
原文地址:http://www.cnblogs.com/hei-hei-hei/p/6877932.html