Skip to content

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

Closed
SOORAJTS2001 wants to merge 1 commit into
MongoEngine:masterfrom
SOORAJTS2001:fix/datetime-in-test
Closed

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

Conversation

@SOORAJTS2001

@SOORAJTS2001 SOORAJTS2001 commented Nov 12, 2025

Copy link
Copy Markdown

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()``
@bagerard

Copy link
Copy Markdown
Collaborator

sorry for the lack of reactivity, got done in #2916

@bagerard bagerard closed this Aug 19, 2026
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.

2 participants