diff --git a/src/py_avro_schema/_schemas.py b/src/py_avro_schema/_schemas.py index 41d5663..2565fff 100644 --- a/src/py_avro_schema/_schemas.py +++ b/src/py_avro_schema/_schemas.py @@ -351,7 +351,7 @@ def data(self, names: NamesType) -> JSONObj: def make_default(self, py_default: datetime.date) -> int: """Return an Avro schema compliant default value for a given Python value""" - return (py_default - datetime.date.fromtimestamp(0)).days + return (py_default - datetime.date(1970, 1, 1)).days class TimeSchema(Schema):