_common.py 文件源码

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

项目:aws-cfn-plex 作者: lordmuffin 项目源码 文件源码
def is_ambiguous(self, dt):
        """
        Whether or not the "wall time" of a given datetime is ambiguous in this
        zone.

        :param dt:
            A :py:class:`datetime.datetime`, naive or time zone aware.


        :return:
            Returns ``True`` if ambiguous, ``False`` otherwise.

        .. versionadded:: 2.6.0
        """
        if not self.hasdst:
            return False

        start, end = self.transitions(dt.year)

        dt = dt.replace(tzinfo=None)
        return (end <= dt < end + self._dst_base_offset)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号