From 21b14af6904123d5c5cc1c575aee7203f65d7800 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 10 May 2015 15:54:58 -0400 Subject: more FlexibleContexts --- Command/Log.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Command') 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 -- cgit v1.2.3