Commit 341dc999 authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #19727: os.utime(..., None) is now potentially more precise under Windows.

parent 1e921b0c
......@@ -68,6 +68,9 @@ Core and Builtins
Library
-------
- Issue #19727: os.utime(..., None) is now potentially more precise
under Windows.
- Issue #17201: ZIP64 extensions now are enabled by default. Patch by
William Mallard.
......
......@@ -4953,13 +4953,8 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
}
if (utime.now) {
SYSTEMTIME now;
GetSystemTime(&now);
if (!SystemTimeToFileTime(&now, &mtime) ||
!SystemTimeToFileTime(&now, &atime)) {
PyErr_SetFromWindowsErr(0);
goto exit;
}
GetSystemTimeAsFileTime(&mtime);
atime = mtime;
}
else {
time_t_to_FILE_TIME(utime.atime_s, utime.atime_ns, &atime);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment