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),
)
评论列表
文章目录