http_server.py 文件源码

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

项目:ZServer 作者: zopefoundation 项目源码 文件源码
def compute_timezone_for_log():
    if time.daylight:
        tz = time.altzone
    else:
        tz = time.timezone
    if tz > 0:
        neg = 1
    else:
        neg = 0
        tz = -tz
    h, rem = divmod(tz, 3600)
    m, rem = divmod(rem, 60)
    if neg:
        return '-%02d%02d' % (h, m)
    else:
        return '+%02d%02d' % (h, m)


# if you run this program over a TZ change boundary, this will be invalid.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号