Skip to content

Fix deprecated datetime.datetime.utcnow() → datetime.datetime.now(datetime.timezone.utc)#14

Open
fazalpsinfo-cmyk wants to merge 2 commits into
baaahs:masterfrom
fazalpsinfo-cmyk:fix/datetime-utcnow
Open

Fix deprecated datetime.datetime.utcnow() → datetime.datetime.now(datetime.timezone.utc)#14
fazalpsinfo-cmyk wants to merge 2 commits into
baaahs:masterfrom
fazalpsinfo-cmyk:fix/datetime-utcnow

Conversation

@fazalpsinfo-cmyk

Copy link
Copy Markdown

Replace deprecated datetime.datetime.utcnow() with timezone-aware datetime.datetime.now(datetime.timezone.utc).

datetime.utcnow() is deprecated in Python 3.12 and will be removed in a future version. This change uses the recommended datetime.now(timezone.utc) which produces a timezone-aware datetime object.

If you find this useful and want to support more contributions like it, consider buying me a coffee: https://buymeacoffee.com/muhamedfazalps

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