archivebot.py 文件源码

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

项目:abusehelper 作者: Exploit-install 项目源码 文件源码
def isoparse(timestring, formats=("%Y-%m-%d %H:%M:%SZ", "%Y-%m-%d %H:%M:%S")):
    """
    >>> isoparse('1970-01-01 00:00:00Z')
    0

    Also support backwards compatible timestamp format:

    >>> isoparse('1970-01-01 00:00:00')
    0
    """

    for format in formats:
        try:
            time_tuple = time.strptime(timestring, format)
        except ValueError:
            continue
        else:
            return calendar.timegm(time_tuple)
    return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号