logic.py 文件源码

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

项目:immobilus 作者: pokidovea 项目源码 文件源码
def start(self):
        global TIME_TO_FREEZE
        global TZ_OFFSET

        self.previous_time_to_freeze = TIME_TO_FREEZE
        self.previous_tz_offset = TZ_OFFSET

        if isinstance(self.time_to_freeze, original_date):
            TIME_TO_FREEZE = self.time_to_freeze
            # Convert to a naive UTC datetime if necessary
            if TIME_TO_FREEZE.tzinfo:
                TIME_TO_FREEZE = TIME_TO_FREEZE.astimezone(utc).replace(tzinfo=None)
        else:
            TIME_TO_FREEZE = parser.parse(self.time_to_freeze)

        TZ_OFFSET = self.tz_offset

        return self.time_to_freeze
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号