Skip to content

Commit

Permalink
fix(eyemeta.py): convert dates to string for saving as json
Browse files Browse the repository at this point in the history
  • Loading branch information
Oli4 committed Nov 15, 2023
1 parent 6727a60 commit 5d715cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/eyepy/core/eyemeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def as_dict(self) -> dict:
"""
data = self._store.copy()

for key in data:
if isinstance(data[key], datetime.datetime):
data[key] = data[key].isoformat()
return data

def __getitem__(self, key: str) -> Any:
Expand Down

0 comments on commit 5d715cd

Please sign in to comment.