def test_pass_datetime_non_utc(self):
"""
The incoming value is a datetime object with a non-UTC
timezone.
"""
self.assertFilterPasses(
datetime(
2015, 6, 27, 22, 6, 32,
tzinfo=tzoffset('UTC-5', -5*3600),
),
# As you probably already guessed, the datetime gets
# converted to UTC before it is converted to a date.
date(2015, 6, 28),
)
评论列表
文章目录