summaryrefslogtreecommitdiff
path: root/Logs/Transitions.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-05-10 14:45:55 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-10 15:21:35 -0400
commitea506b28110d0e23210fb788b16ffe3deb92f23b (patch)
treee75cd9cbf7e45375f0619a97d2ffb62af3fe31ef /Logs/Transitions.hs
parent0c7caf1e92eda1dde83b9fa95da5fc304ae2767d (diff)
support time-1.5.0
This no longer uses old-locale's defaultTimeLocale, but provides one of its own. Factored out a Logs.TimeStamp.
Diffstat (limited to 'Logs/Transitions.hs')
-rw-r--r--Logs/Transitions.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Logs/Transitions.hs b/Logs/Transitions.hs
index d782455a6..5ccfd7e8c 100644
--- a/Logs/Transitions.hs
+++ b/Logs/Transitions.hs
@@ -15,11 +15,10 @@
module Logs.Transitions where
import Data.Time.Clock.POSIX
-import Data.Time
-import System.Locale
import qualified Data.Set as S
import Common.Annex
+import Logs.TimeStamp
transitionsLog :: FilePath
transitionsLog = "transitions.log"
@@ -66,12 +65,13 @@ showTransitionLine :: TransitionLine -> String
showTransitionLine (TransitionLine ts t) = unwords [show t, show ts]
parseTransitionLine :: String -> Maybe TransitionLine
-parseTransitionLine s = TransitionLine <$> pdate ds <*> readish ts
+parseTransitionLine s = TransitionLine
+ <$> parsePOSIXTime ds
+ <*> readish ts
where
ws = words s
ts = Prelude.head ws
ds = unwords $ Prelude.tail ws
- pdate = utcTimeToPOSIXSeconds <$$> parseTime defaultTimeLocale "%s%Qs"
combineTransitions :: [Transitions] -> Transitions
combineTransitions = S.unions