utils.py 文件源码

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

项目:kuberdock-platform 作者: cloudlinux 项目源码 文件源码
def append_offset_to_timezone(tz):
    """Appends offset value to timezone string:
    Europe/London -> Europe/London (+000)
    """
    if tz not in common_timezones:
        return tz
    offset = datetime.now(timezone(tz)).strftime('%z')
    return '{0} ({1}:{2})'.format(tz, offset[:3], offset[3:])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号