From 2677e5f4a07bf95b3abbc0cc8719e9e4e6b468de Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 2 Aug 2014 10:52:49 -0700 Subject: native: Fix utime() for windows Apparently the units are in milliseconds, not in seconds! --- src/libnative/io/file_win32.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libnative/io') diff --git a/src/libnative/io/file_win32.rs b/src/libnative/io/file_win32.rs index 0f8fa261802..a024d498ef3 100644 --- a/src/libnative/io/file_win32.rs +++ b/src/libnative/io/file_win32.rs @@ -516,8 +516,8 @@ pub fn lstat(_p: &CString) -> IoResult { pub fn utime(p: &CString, atime: u64, mtime: u64) -> IoResult<()> { let mut buf = libc::utimbuf { - actime: (atime / 1000) as libc::time64_t, - modtime: (mtime / 1000) as libc::time64_t, + actime: atime as libc::time64_t, + modtime: mtime as libc::time64_t, }; let p = try!(to_utf16(p)); super::mkerr_libc(unsafe { -- cgit 1.4.1-3-g733a5