comtypes icon indicating copy to clipboard operation
comtypes copied to clipboard

"Typelib newer than module" timezone issue

Open forderud opened this issue 6 years ago • 0 comments

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:

  1. Typelib is built in central Europe (GMT+1) at 1AM in the morning.
  2. Typelib is attempted used in California (GMT-8) immediately afterwards (4PM the day before)
  3. 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.

forderud avatar Mar 28 '19 09:03 forderud