Skip to content

Upgrading tests to use timezone.utc rather than deprecated utcnow()#2900

Open
SOORAJTS2001 wants to merge 1 commit intoMongoEngine:masterfrom
SOORAJTS2001:fix/datetime-in-test
Open

Upgrading tests to use timezone.utc rather than deprecated utcnow()#2900
SOORAJTS2001 wants to merge 1 commit intoMongoEngine:masterfrom
SOORAJTS2001:fix/datetime-in-test

Conversation

@SOORAJTS2001
Copy link

@SOORAJTS2001 SOORAJTS2001 commented Nov 12, 2025

fix: modify datetime.datetime.utcnow() to datetime.datetime.now(datetime.timezone.utc) inside tests since utcnow() is deprecated from 3.12 onwards
fix: change code inside defining-documents.rst and signals.rst to accommodate datetime.datetime.now(datetime.timezone.utc)

This is a follow up for the Issue #2883

@bagerard @rozza can you please take a look into it

…tetime.timezone.utc)` inside test since utcnow() is deprecated from 3.12 onwards

fix: change code inside `defining-documents.rst` and `signals.rst` to accommodate  `datetime.datetime.utcnow()``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant