From 75e9eb21a29d0f972239d15e9345e63f035f6c77 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Fri, 24 Jul 2015 11:08:24 +1000 Subject: [PATCH] convertTime --- fuseops/convert.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fuseops/convert.go b/fuseops/convert.go index 70b43dc..3ce0c99 100644 --- a/fuseops/convert.go +++ b/fuseops/convert.go @@ -417,7 +417,12 @@ func Convert( return } -func convertTime(t time.Time) (secs uint64, nsec uint32) +func convertTime(t time.Time) (secs uint64, nsec uint32) { + totalNano := t.UnixNano() + secs = uint64(totalNano / 1e9) + nsec = uint32(totalNano % 1e9) + return +} func convertAttributes( inodeID InodeID,