Skip to content

Commit

Permalink
Merge pull request #95 from cfossace/main
Browse files Browse the repository at this point in the history
fix: [main] Fixed Datetime Serialization
  • Loading branch information
cvandeplas authored Sep 19, 2024
2 parents 6b66be4 + e21d21f commit 7b9f92f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,3 @@ Tested On:
# License
This project is released under the European Public Licence
https://commission.europa.eu/content/european-union-public-licence_en



4 changes: 4 additions & 0 deletions utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def _handle_bytes(value, skip_underscore=False):
except Exception:
return base64.b64encode(value).decode(errors='ignore')

@json_serializable.register(datetime)
def _handle_datetime(value, skip_underscore=False):
return value.isoformat()


def find_datetime(d):
for k, v in d.items():
Expand Down

0 comments on commit 7b9f92f

Please sign in to comment.