Skip to content
Snippets Groups Projects
Unverified Commit fe093d9c authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Get the time math right

parent 59d98d2e
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,7 @@ import Data.Time.Calendar
import Data.Time.Clock
( UTCTime(UTCTime)
, DiffTime
, secondsToDiffTime
)
import Data.Time.Clock.POSIX
( posixSecondsToUTCTime
, addUTCTime
)
import Data.Text
......@@ -156,7 +153,10 @@ readImmutableLeases path =
toUTCTime :: Integer -> UTCTime
toUTCTime posixTimestamp =
UTCTime (fromGregorian 1970 1 0) (secondsToDiffTime posixTimestamp)
let
epoch = UTCTime (fromGregorian 1970 1 1) 0
in
addUTCTime (fromInteger posixTimestamp) epoch
readMutableLeases :: FilePath -> IO [LeaseInfo]
readMutableLeases path = return []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment