mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #32366 -- Updated datetime module usage to recommended approach.
- Replaced datetime.utcnow() with datetime.now(). - Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp(). - Replaced datetime.utctimetuple() with datetime.timetuple(). - Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
This commit is contained in:
committed by
Carlton Gibson
parent
69ffb1acf3
commit
d06c5b3581
@@ -92,7 +92,7 @@ class MultiColumnFKTests(TestCase):
|
||||
|
||||
def test_reverse_query_filters_correctly(self):
|
||||
|
||||
timemark = datetime.datetime.utcnow()
|
||||
timemark = datetime.datetime.now(tz=datetime.timezone.utc).replace(tzinfo=None)
|
||||
timedelta = datetime.timedelta(days=1)
|
||||
|
||||
# Creating a to valid memberships
|
||||
|
||||
Reference in New Issue
Block a user