diff options
author | Christian Heimes <christian@cheimes.de> | 2013-11-23 14:59:07 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-11-23 14:59:07 (GMT) |
commit | 5de397e158d538ffa065974006e58547891bd955 (patch) | |
tree | dfa6715108e51cb33635bdf23210443f42898b03 /Modules | |
parent | 4c05b472ddd4634138b6abfa857ee37761d33185 (diff) | |
parent | 2cf3917954dab65c025ea39f8b6a0298c598f9f7 (diff) | |
download | cpython-5de397e158d538ffa065974006e58547891bd955.zip cpython-5de397e158d538ffa065974006e58547891bd955.tar.gz cpython-5de397e158d538ffa065974006e58547891bd955.tar.bz2 |
merge
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 9 | ||||
-rw-r--r-- | Modules/timemodule.c | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 71b1437..4c96204 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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); diff --git a/Modules/timemodule.c b/Modules/timemodule.c index ca39906..d3878b9 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -650,7 +650,7 @@ time_strftime(PyObject *self, PyObject *args) return NULL; } } -#elif defined(_AIX) && defined(HAVE_WCSFTIME) +#elif (defined(_AIX) || defined(sun)) && defined(HAVE_WCSFTIME) for(outbuf = wcschr(fmt, '%'); outbuf != NULL; outbuf = wcschr(outbuf+2, '%')) |