Increase MIN_DATETIME_FROM_TIMESTAMP for windows

Otherwise test_datetime_from_timestamp will give an OSError. This seems
to be a similar problem as https://bugs.python.org/issue29097
This commit is contained in:
Alexander Niederbühl 2019-07-15 07:59:47 +02:00
parent 29b0a02fda
commit f642f19167
1 changed files with 1 additions and 2 deletions

View File

@ -48,11 +48,10 @@ MIN_MICROSECONDS = int(pdt.timedelta.min.total_seconds() * 1e6)
IS_X86 = platform.architecture()[0] == '32bit' IS_X86 = platform.architecture()[0] == '32bit'
IS_WINDOWS = sys.platform == 'win32' IS_WINDOWS = sys.platform == 'win32'
if IS_WINDOWS: if IS_WINDOWS:
if IS_X86:
MIN_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(86400) MIN_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(86400)
if IS_X86:
MAX_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(32536789199) MAX_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(32536789199)
else: else:
MIN_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(0)
MAX_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(32536799999) MAX_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(32536799999)
else: else:
if IS_X86: if IS_X86: