about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorPeter Atashian <retep998@gmail.com>2014-08-07 04:05:00 -0400
committerPeter Atashian <retep998@gmail.com>2014-08-07 04:05:00 -0400
commitfeb219d23fd4236fc69ec86e34c088e232289534 (patch)
tree460d17654ca883be34400eef5f1a17e0d8d54073 /src/libstd
parent51e19e750185f60e404412f702f8f2edc7bc1245 (diff)
downloadrust-feb219d23fd4236fc69ec86e34c088e232289534.tar.gz
rust-feb219d23fd4236fc69ec86e34c088e232289534.zip
windows: Fix several tests on 64-bit.
Signed-off-by: Peter Atashian <retep998@gmail.com>
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/fs.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs
index 246ff901f5c..e0a6c702627 100644
--- a/src/libstd/io/fs.rs
+++ b/src/libstd/io/fs.rs
@@ -1592,10 +1592,11 @@ mod test {
         let tmpdir = tmpdir();
         let path = tmpdir.join("a");
         check!(File::create(&path));
-
-        check!(change_file_times(&path, 1000, 2000));
-        assert_eq!(check!(path.stat()).accessed, 1000);
-        assert_eq!(check!(path.stat()).modified, 2000);
+        // These numbers have to be bigger than the time in the day to account for timezones
+        // Windows in particular will fail in certain timezones with small enough values
+        check!(change_file_times(&path, 100000, 200000));
+        assert_eq!(check!(path.stat()).accessed, 100000);
+        assert_eq!(check!(path.stat()).modified, 200000);
     })
 
     iotest!(fn utime_noexist() {