From b48540ee9f1773e0d373329010a53b1599d05d68 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Wed, 29 Oct 2025 13:42:16 -0700 Subject: [PATCH] fix(testing_lib): fix datetime decoder for filesystem - use upper camel case as key in datetime object hook --- .../stores/filesystem.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aws_durable_execution_sdk_python_testing/stores/filesystem.py b/src/aws_durable_execution_sdk_python_testing/stores/filesystem.py index 3da15a47..6ccd4b1b 100644 --- a/src/aws_durable_execution_sdk_python_testing/stores/filesystem.py +++ b/src/aws_durable_execution_sdk_python_testing/stores/filesystem.py @@ -26,7 +26,9 @@ def datetime_object_hook(obj): """JSON object hook to convert unix timestamps back to datetime objects.""" if isinstance(obj, dict): for key, value in obj.items(): - if isinstance(value, int | float) and key.endswith(("_timestamp", "_time")): + if isinstance(value, int | float) and key.endswith( + ("_timestamp", "_time", "Timestamp", "Time") + ): try: # noqa: SIM105 obj[key] = datetime.fromtimestamp(value, tz=UTC) except (ValueError, OSError):