cvslib.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码
def unctime(date):
    if date == "None": return None
    if not unctime_monthmap:
        months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                  'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        i = 0
        for m in months:
            i = i+1
            unctime_monthmap[m] = i
    words = string.split(date) # Day Mon DD HH:MM:SS YEAR
    year = string.atoi(words[4])
    month = unctime_monthmap[words[1]]
    day = string.atoi(words[2])
    [hh, mm, ss] = map(string.atoi, string.splitfields(words[3], ':'))
    ss = ss - time.timezone
    return time.mktime((year, month, day, hh, mm, ss, 0, 0, 0))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号