From 910693f921493e76ded15831a6e306c39d66176d Mon Sep 17 00:00:00 2001 From: Ben S Date: Wed, 6 May 2015 21:47:04 +0100 Subject: [PATCH] The timestamp fields are now in seconds! Fixes #62. --- src/file.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/file.rs b/src/file.rs index 88092b5..48f5366 100644 --- a/src/file.rs +++ b/src/file.rs @@ -345,12 +345,11 @@ impl<'a> File<'a> { fn timestamp(&self, time_type: TimeType, current_year: i64, locale: &locale::Time) -> Cell { - // Need to convert these values from milliseconds into seconds. let time_in_seconds = match time_type { TimeType::FileAccessed => self.stat.as_raw().atime(), TimeType::FileModified => self.stat.as_raw().mtime(), TimeType::FileCreated => self.stat.as_raw().ctime(), - } as i64 / 1000; + } as i64; let date = LocalDateTime::at(time_in_seconds);