1
0
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:
Nick Pope
2021-05-07 10:42:59 +01:00
committed by Carlton Gibson
parent 69ffb1acf3
commit d06c5b3581
17 changed files with 75 additions and 77 deletions

View File

@@ -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