aboutsummaryrefslogtreecommitdiff
path: root/Command/Log.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-05-10 15:54:58 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-10 15:54:58 -0400
commit21b14af6904123d5c5cc1c575aee7203f65d7800 (patch)
tree0e0eab5309cc173bda782f536ff329c93fd6aa14 /Command/Log.hs
parenteed3f3b09b642d1db653d84788953eac81880e01 (diff)
more FlexibleContexts
Diffstat (limited to 'Command/Log.hs')
-rw-r--r--Command/Log.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Command/Log.hs b/Command/Log.hs
index e1438ba15..671c9d674 100644
--- a/Command/Log.hs
+++ b/Command/Log.hs
@@ -176,7 +176,11 @@ parseRaw l = go $ words l
parseTimeStamp :: String -> POSIXTime
parseTimeStamp = utcTimeToPOSIXSeconds . fromMaybe (error "bad timestamp") .
+#if MIN_VERSION_time(1,5,0)
+ parseTimeM True defaultTimeLocale "%s"
+#else
parseTime defaultTimeLocale "%s"
+#endif
showTimeStamp :: TimeZone -> POSIXTime -> String
showTimeStamp zone = show . utcToLocalTime zone . posixSecondsToUTCTime