SmoothUtils.py 文件源码

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

项目:SSTV-PLEX-PLUGIN 作者: vorghahn 项目源码 文件源码
def GetDateTimeNative(strTime):
    try:
        parser = dateutil.parser()
        is_dst = time.daylight and time.localtime().tm_isdst > 0
        utc_offset = - (time.altzone if is_dst else time.timezone)
        return (parser.parse(strTime) - datetime.timedelta(hours=Dict['ScheduleUtcOffset'])).replace(tzinfo=dateutil.tz.tzutc()).astimezone(dateutil.tz.tzlocal())
    except:
        Log.Error("GetDateTimeNative " + strTime)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号