diff --git a/singer_sdk/helpers/_typing.py b/singer_sdk/helpers/_typing.py index 2ccb9c471..1e7370fd9 100644 --- a/singer_sdk/helpers/_typing.py +++ b/singer_sdk/helpers/_typing.py @@ -511,7 +511,7 @@ def _conform_primitive_property( # noqa: PLR0911 if isinstance(elem, (datetime.datetime,)): return to_json_compatible(elem) if isinstance(elem, datetime.date): - return f"{elem.isoformat()}T00:00:00+00:00" + return elem.isoformat() if isinstance(elem, datetime.timedelta): epoch = datetime.datetime.fromtimestamp(0, UTC) timedelta_from_epoch = epoch + elem diff --git a/tests/core/test_typing.py b/tests/core/test_typing.py index 66182c52d..5043c75e1 100644 --- a/tests/core/test_typing.py +++ b/tests/core/test_typing.py @@ -294,7 +294,7 @@ def test_conform_primitives(): ) assert ( _conform_primitive_property(datetime.date(2020, 5, 17), {"type": "string"}) - == "2020-05-17T00:00:00+00:00" + == "2020-05-17" ) assert ( _conform_primitive_property(datetime.timedelta(365), {"type": "string"})