summaryrefslogtreecommitdiff
path: root/Command/Log.hs
diff options
context:
space:
mode:
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