From ea506b28110d0e23210fb788b16ffe3deb92f23b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 10 May 2015 14:45:55 -0400 Subject: support time-1.5.0 This no longer uses old-locale's defaultTimeLocale, but provides one of its own. Factored out a Logs.TimeStamp. --- Logs/SingleValue.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Logs/SingleValue.hs') diff --git a/Logs/SingleValue.hs b/Logs/SingleValue.hs index dbbe996f3..213bcd217 100644 --- a/Logs/SingleValue.hs +++ b/Logs/SingleValue.hs @@ -15,11 +15,10 @@ module Logs.SingleValue where import Common.Annex import qualified Annex.Branch +import Logs.TimeStamp import qualified Data.Set as S import Data.Time.Clock.POSIX -import Data.Time -import System.Locale class SingleValueSerializable v where serialize :: v -> String @@ -42,7 +41,7 @@ parseLog = S.fromList . mapMaybe parse . lines where parse line = do let (ts, s) = splitword line - date <- utcTimeToPOSIXSeconds <$> parseTime defaultTimeLocale "%s%Qs" ts + date <- parsePOSIXTime ts v <- deserialize s Just (LogEntry date v) splitword = separate (== ' ') -- cgit v1.2.3