Implement millisecond resolution for objects Win32 objects to Python Objects
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
Win32 VariantTimeToSystemTime function has a known issue that it doesn't output the msec information even though the object may have it specified.
Attached is the implementation from the original bug report 387 with the proposed patch to obtain the msec resolution.
Ignore the previous patch, it didn't work work with 220 release.
Instead revamped PyTime to use only DATETIME_CAPI, thus this drops support for <py2.4
I would assume that anyone running on such older revisions of python wouldnt be interested on the latest version of these packages thus I think its fine to drop support.
I don't think I can take any of these patches. Getting non-zero ms does sound good, but the first patch does:
which seems wrong - milliseconds is calculated but never used, and we return seconds * 10 - which I don't understand how could be the ms.
The second patch changes whitespace unnecessarily and not always in ways I agree with (eg, I prefer the "case" statements to be indented from their "switch") - but in general, simple stylistic whitespace changes just create "blame" noise and offer no real benefit.
The third and fourth patch runs the risk of changing the semantics of the time objects for Python 2.x users - I explicitly decided not to do that when working on py3k - it's important we don't break 2.x users (I've no problem with breaking python 2.4 support, but not in changing the datetime semantics for 2.7 users)
I don't understand the 5th patch at all - isn't that going to completely change the returned object sematics (ie, the object will no longer be using utc)?
I'd be happy to take a new patch that solves "ms is always zero" though.
Sorry for that, it was my first time trying to contribute on an open source project and still had alot to learn about it :)
I'll try again for the "ms is always zero" only though.