def test_encoding_datetime_not_in_utc(self):
some_timezone = datetime.timezone(datetime.timedelta(hours=-7))
input = datetime.datetime(2016, 12, 10, 11, 15, 45, 123456,
tzinfo=some_timezone)
encoded = encoding.datetime_to_rfc3339_string(input)
assert encoded == '2016-12-10T18:15:45.123456Z'
评论列表
文章目录