summaryrefslogtreecommitdiff
path: root/src/File.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-09 03:04:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-09 03:15:10 +0900
commitb0f440e631efe18099ced96b604447b5fdce28d8 (patch)
treed4a705616a58c314eab568772d5a3c4cc53bd69b /src/File.cc
parent99cd73c0926f0c07d27777fde2f15816e8040030 (diff)
Rewrite Time with chrono
Diffstat (limited to 'src/File.cc')
-rw-r--r--src/File.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/File.cc b/src/File.cc
index 3237c6c1..b90087aa 100644
--- a/src/File.cc
+++ b/src/File.cc
@@ -257,14 +257,14 @@ bool File::utime(const Time& actime, const Time& modtime) const
{
#if defined(HAVE_UTIMES) && !defined(__MINGW32__)
struct timeval times[2] = {
- { actime.getTime(), 0 },
- { modtime.getTime(), 0 }
+ { actime.getTimeFromEpoch(), 0 },
+ { modtime.getTimeFromEpoch(), 0 }
};
return utimes(name_.c_str(), times) == 0;
#else // !HAVE_UTIMES
a2utimbuf ub;
- ub.actime = actime.getTime();
- ub.modtime = modtime.getTime();
+ ub.actime = actime.getTimeFromEpoch();
+ ub.modtime = modtime.getTimeFromEpoch();
return a2utime(utf8ToWChar(name_).c_str(), &ub) == 0;
#endif // !HAVE_UTIMES
}