diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-10-09 20:44:25 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-10-09 20:44:25 (GMT) |
commit | f43893a878991a00da1f1501f70d8b70797f31c0 (patch) | |
tree | 962ab2870ae355b56697e53c6d8b3a2699070894 /Modules/posixmodule.c | |
parent | e5ec613c4b80a50ca324c26d9704e69a97ca900c (diff) | |
download | cpython-f43893a878991a00da1f1501f70d8b70797f31c0.zip cpython-f43893a878991a00da1f1501f70d8b70797f31c0.tar.gz cpython-f43893a878991a00da1f1501f70d8b70797f31c0.tar.bz2 |
Bug #1565150: Fix subsecond processing for os.utime on Windows.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 45ea988..93d0300 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -792,7 +792,7 @@ time_t_to_FILE_TIME(int time_in, int nsec_in, FILETIME *out_ptr) /* XXX endianness */ __int64 out; out = time_in + secs_between_epochs; - out = out * 10000000 + nsec_in; + out = out * 10000000 + nsec_in / 100; memcpy(out_ptr, &out, sizeof(out)); } @@ -2501,11 +2501,11 @@ posix_utime(PyObject *self, PyObject *args) if (extract_time(PyTuple_GET_ITEM(arg, 0), &atimesec, &ausec) == -1) goto done; - time_t_to_FILE_TIME(atimesec, ausec, &atime); + time_t_to_FILE_TIME(atimesec, 1000*ausec, &atime); if (extract_time(PyTuple_GET_ITEM(arg, 1), &mtimesec, &musec) == -1) goto done; - time_t_to_FILE_TIME(mtimesec, musec, &mtime); + time_t_to_FILE_TIME(mtimesec, 1000*musec, &mtime); } if (!SetFileTime(hFile, NULL, &atime, &mtime)) { /* Avoid putting the file name into the error here, |