Subscribie / subscribie

Collect recurring payments online - subscription payments collection automation
https://subscribie.co.uk
Mozilla Public License 2.0
56 stars 20 forks source link

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

Closed chrisjsimpson closed 3 months ago

chrisjsimpson commented 3 months ago

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

https://github.com/Subscribie/subscribie/issues/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

github-actions[bot] commented 3 months ago

:rocket: Issue was released in v0.1.198 :rocket:

github-actions[bot] commented 3 months ago

:rocket: Issue was released in v0.1.198 :rocket: