Python时间处理总结

2016/02/21 Python 阅读次数: 时间

 # import datetime
    # TIME = reslut.get('Date', 0)
    # GMT_FORMAT = '%a, %d %b %Y %H:%M:%S GMT'
    # res = datetime.datetime.strptime(TIME, GMT_FORMAT)+datetime.timedelta(hours=9,seconds=9)
    # print(str(res))
    # # 转换成时间数组
    # timeArray = time.strptime(str(res), "%Y-%m-%d %H:%M:%S")
    # # 转换成时间戳
    # timestamp = time.mktime(timeArray)
    # print(timestamp)

Search

    Table of Contents