mirror of
https://github.com/django/django.git
synced 2025-11-25 13:13:28 +00:00
Fixed #28739 -- Fixed get_fixed_timezone() for negative timedeltas.
This commit is contained in:
parent
3576bfe07c
commit
d1317edad0
2 changed files with 5 additions and 1 deletions
|
|
@ -194,5 +194,9 @@ class TimezoneTests(SimpleTestCase):
|
|||
delta = datetime.timedelta(hours=1)
|
||||
self.assertEqual(timezone.get_fixed_timezone(delta).utcoffset(''), delta)
|
||||
|
||||
def test_fixedoffset_negative_timedelta(self):
|
||||
delta = datetime.timedelta(hours=-2)
|
||||
self.assertEqual(timezone.get_fixed_timezone(delta).utcoffset(''), delta)
|
||||
|
||||
def test_fixedoffset_pickle(self):
|
||||
self.assertEqual(pickle.loads(pickle.dumps(timezone.FixedOffset(0, 'tzname'))).tzname(''), 'tzname')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue