comtypes
comtypes copied to clipboard
"Typelib newer than module" timezone issue
The Typelib time-stamp checking in https://github.com/enthought/comtypes/blob/master/comtypes/init.py#L39 does not seem to account for timezone differences. This leads to problems if a newly built TypeLib is attempted used in a more westward timezone.
Example to illustrate the problem:
- Typelib is built in central Europe (GMT+1) at 1AM in the morning.
- Typelib is attempted used in California (GMT-8) immediately afterwards (4PM the day before)
- Observe comtypes raise a "Typelib newer than module" exception due to the Typelib being created in the "future".
Suggested fix: Consider adding a 24 hour slack to the timezone check to account for timezone differences.