Skip to content

Commit 07b1502

Browse files
author
Alex Wang
committed
fix(testing lib): fix datetime decode
- decode datetime with upper camel case
1 parent b99828d commit 07b1502

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/aws_durable_execution_sdk_python_testing/stores/filesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def datetime_object_hook(obj):
2626
"""JSON object hook to convert unix timestamps back to datetime objects."""
2727
if isinstance(obj, dict):
2828
for key, value in obj.items():
29-
if isinstance(value, int | float) and key.endswith(("_timestamp", "_time")):
29+
if isinstance(value, int | float) and key.endswith(("_timestamp", "_time", "Time", "Timestamp")):
3030
try: # noqa: SIM105
3131
obj[key] = datetime.fromtimestamp(value, tz=UTC)
3232
except (ValueError, OSError):

0 commit comments

Comments
 (0)