def test_pass_alternate_timezone_syntax(self):
"""
When setting the default timezone for the Filter, you can use
an int/float offset (number of hours from UTC) instead of a
tzoffset object.
"""
self.assertFilterPasses(
# Note that we use an int value instead of constructing a
# tzoffset for ``timezone``.
self._filter('2015-05-11 21:14:38', timezone=3),
datetime(2015, 5, 11, 18, 14, 38, tzinfo=utc),
)
评论列表
文章目录