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:
parent
29b0a02fda
commit
f642f19167
|
@ -48,11 +48,10 @@ MIN_MICROSECONDS = int(pdt.timedelta.min.total_seconds() * 1e6)
|
|||
IS_X86 = platform.architecture()[0] == '32bit'
|
||||
IS_WINDOWS = sys.platform == 'win32'
|
||||
if IS_WINDOWS:
|
||||
MIN_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(86400)
|
||||
if IS_X86:
|
||||
MIN_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(86400)
|
||||
MAX_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(32536789199)
|
||||
else:
|
||||
MIN_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(0)
|
||||
MAX_DATETIME_FROM_TIMESTAMP = pdt.datetime.fromtimestamp(32536799999)
|
||||
else:
|
||||
if IS_X86:
|
||||
|
|
Loading…
Reference in New Issue