diff --git a/src/py_adapter/__init__.py b/src/py_adapter/__init__.py index b34385b..21091b8 100644 --- a/src/py_adapter/__init__.py +++ b/src/py_adapter/__init__.py @@ -457,7 +457,7 @@ def _parse_date(self, data: Union[datetime.date, int, str], schema: avro.schema. if isinstance(data, int): # Assume we have serialized as a timestamp in milliseconds. Now that is NOT how we would have serialized it # if it was Avro. So this is useful only in combination with serializing using ``datetime_type=int``. - return datetime.date.fromtimestamp(data / 1e3) + return datetime.datetime.fromtimestamp(data / 1e3, tz=datetime.timezone.utc).date() elif isinstance(data, str): return dateutil.parser.isoparse(data).date() else: