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

Hotfix Correct created_at evaluation to time of insert for datetime date #1387

Closed
chrisjsimpson opened this issue Aug 10, 2024 · 2 comments
Closed
Labels
released This issue/pull request has been released.

Comments

@chrisjsimpson
Copy link
Contributor

Is your feature request related to a problem? Please describe.

#1336 broke created_at timestamps due to

This was caused by created_at = database.Column(database.DateTime, default=datetime.utcnow)

Which was introduced as part of fixing the following deprecation warnings (36):

DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC)

Describe the solution you'd like

Take the Deprecation fix, but delay execution with created_at = lambda: datetime.datetime.now(datetime.UTC)

Describe alternatives you've considered

Additional context

Copy link

🚀 Issue was released in v0.1.198 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Aug 10, 2024
Copy link

🚀 Issue was released in v0.1.198 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

No branches or pull requests

1 participant