simple_test.py 文件源码

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

项目:filters 作者: eflglobal 项目源码 文件源码
def test_pass_naive_timestamp_default_timezone(self):
        """
        The incoming value is a naive timestamp, but the Filter is
        configured not to treat naive timestamps as UTC.
        """
        self.assertFilterPasses(
            self._filter(
                '2015-05-12 03:20:03',

                # The Filter is configured to parse naive timestamps as
                # if they are UTC+8.
                timezone = tzoffset('UTC+8', 8*3600)
            ),

            # The resulting date appears to occur 1 day earlier because
            # the Filter subtracted 8 hours to convert the value to
            # UTC.
            date(2015, 5, 11),
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号