pythoncom.MakeTime() should take parameters of type long
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
pythoncom.MakeTime() takes only ints and so cannot
make a time later than MakeTime(sys.maxint), which is
2038-01-19 04:14:07. This is a problem when I am
talking to a COM object that is expecting a date, and
the date is the maturity of a 50-year interest swap.
>>> pythoncom.MakeTime(sys.maxint)
<PyTime:2038-01-19 04:14:07>
>>> pythoncom.MakeTime(sys.maxint+1)
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
OverflowError: long int too large to convert to int
It appears that pythonwin.client's marshalling process
suppresses this error and substitutes
pythoncom.MakeTime(0).