Skip to content

Commit

Permalink
fix: datetime.UTC does not exist in Python < 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 22, 2024
1 parent 611a839 commit 6cd0eae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0.20.4
- fix: datetime.UTC does not exist in Python < 3.11
0.20.3
- enh: improve spam user signup detection
- ref: replace deprecations
Expand Down
2 changes: 1 addition & 1 deletion ckanext/dcor_schemas/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def after_resource_create(self, context, resource):
# TODO: Does it make more sense to put this in a different method
# of IResourceController?
res_data_dict = {
"last_modified": datetime.datetime.now(datetime.UTC)
"last_modified": datetime.datetime.now(datetime.timezone.utc)
}

if not resource.get("mimetype"):
Expand Down

0 comments on commit 6cd0eae

Please sign in to comment.