icalendar.py 文件源码

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

项目:vobject 作者: eventable 项目源码 文件源码
def getTzid(tzid, smart=True):
    """
    Return the tzid if it exists, or None.
    """
    tz = __tzidMap.get(toUnicode(tzid), None)
    if smart and tzid and not tz:
        try:
            from pytz import timezone, UnknownTimeZoneError
            try:
                tz = timezone(tzid)
                registerTzid(toUnicode(tzid), tz)
            except UnknownTimeZoneError as e:
                logging.error(e)
        except ImportError as e:
            logging.error(e)
    return tz
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号