diff --git a/taos/field.py b/taos/field.py index 9b7c2fb3..d4af9601 100644 --- a/taos/field.py +++ b/taos/field.py @@ -10,7 +10,10 @@ _priv_tz = None _utc_tz = pytz.timezone("UTC") -_datetime_epoch = datetime.fromtimestamp(0) +try: + _datetime_epoch = datetime.fromtimestamp(0) +except OSError: + _datetime_epoch = datetime.fromtimestamp(86400) - timedelta(seconds=86400) _utc_datetime_epoch = _utc_tz.localize(datetime.utcfromtimestamp(0))