mirror of
https://github.com/django/django.git
synced 2025-04-05 22:16:41 +00:00
[2.1.x] Refs #29514 -- Added test for get_default_timezone()/timezone.utc equality.
Backport of f4ef71c689b7bf3b0237d12c634fe5557f646a79 from master
This commit is contained in:
parent
3a6040246f
commit
278457988a
@ -190,6 +190,10 @@ class TimezoneTests(SimpleTestCase):
|
||||
def test_get_default_timezone(self):
|
||||
self.assertEqual(timezone.get_default_timezone_name(), 'America/Chicago')
|
||||
|
||||
def test_get_default_timezone_utc(self):
|
||||
with override_settings(USE_TZ=True, TIME_ZONE='UTC'):
|
||||
self.assertIs(timezone.get_default_timezone(), timezone.utc)
|
||||
|
||||
def test_fixedoffset_timedelta(self):
|
||||
delta = datetime.timedelta(hours=1)
|
||||
self.assertEqual(timezone.get_fixed_timezone(delta).utcoffset(''), delta)
|
||||
|
Loading…
x
Reference in New Issue
Block a user