simple_test.py 文件源码

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

项目:filters 作者: eflglobal 项目源码 文件源码
def test_pass_aware_timestamp_default_timezone(self):
        """
        The Filter's default timezone has no effect if the incoming
        value already contains timezone info.
        """
        self.assertFilterPasses(
            # The incoming timestamp is from UTC+4, but the Filter is
            # configured to use UTC-11 by default.
            self._filter(
                '2015-05-11T03:14:38+04:00',
                timezone = tzoffset('UTC-11', -11*3600)
            ),

            # Because the incoming timestamp has timezone info, the
            # Filter uses that instead of the default value.
            # Note that the this test will fail if the Filter uses the
            # UTC-11 timezone (the result will be 1 day ahead).
            date(2015, 5, 10),
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号