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

replaced deprecated datetime.utcnow() with datetime.now() #941

Closed
wants to merge 1 commit into from

Conversation

Eddiedigits
Copy link
Contributor

literally the title.

Checked that .isoformat() still works

@mdipierro
Copy link
Contributor

py4web intentionally used utcnow() so that it would use utc time everywhere internally as opposed to server time. Using now() aka server time is problematic. We could use now(timezone.utc). Let me think about this more carefully and get back on this asap.

@mdipierro
Copy link
Contributor

Here is my proposal. define in now=datetime.datetime.now(timezone.utc) in core.py and use that everywhere. Users who prefer to use a different concept of now can redefine it.

@mdipierro
Copy link
Contributor

Closing because now we have utcnow() in core

@mdipierro mdipierro closed this Nov 13, 2024
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