Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(models): add datetime import and replace deprecated utcnow #2872

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

MukundSinghRajput
Copy link
Contributor

  • Added import datetime to ensure datetime functionality is available
  • Replaced deprecated datetime.datetime.utcnow() with datetime.datetime.now(datetime.timezone.utc)
  • Used lambda for dynamic evaluation of default datetime in BlogPost.posted field

- Added `import datetime` to ensure datetime functionality is available
- Replaced deprecated `datetime.datetime.utcnow()` with `datetime.datetime.now(datetime.timezone.utc)`
- Used lambda for dynamic evaluation of default datetime in BlogPost.posted field
@bagerard
Copy link
Collaborator

bagerard commented Apr 9, 2025

makes sense, thanks for the contribution 👍

@bagerard bagerard merged commit 7504670 into MongoEngine:master Apr 9, 2025
18 of 20 checks passed
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