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

Remove deprecated datetime.utcnow() in favour of datetime.now(tz=tzutc()) #124

Merged

Conversation

silvanocerza
Copy link
Contributor

As documented the function datetime.utcnow() is deprecated and will be removed in future versions.

They recommend using datetime.now(timezone.utc) in its place. I decided to use tzutc() in this case as I see the project is using python-dateutils and this might be prefered.

This won't probably be removed in 3.13 as it just been deprecated in 3.12 so it's low priority, though still something that needs to be updated as it emits annoying deprecation warnings.

@silvanocerza
Copy link
Contributor Author

@neilkakkar should I close this?

@neilkakkar neilkakkar self-requested a review September 5, 2024 11:14
@neilkakkar
Copy link
Collaborator

i'll get this merged in, sorry this fell through the cracks!

@neilkakkar neilkakkar merged commit 28c4802 into PostHog:master Sep 24, 2024
2 checks passed
@silvanocerza silvanocerza deleted the remove-deprecated-datetime-utcnow branch September 25, 2024 09:40
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