diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-05-10 15:54:58 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-10 15:54:58 -0400 |
commit | 21b14af6904123d5c5cc1c575aee7203f65d7800 (patch) | |
tree | 0e0eab5309cc173bda782f536ff329c93fd6aa14 /Command/Log.hs | |
parent | eed3f3b09b642d1db653d84788953eac81880e01 (diff) |
more FlexibleContexts
Diffstat (limited to 'Command/Log.hs')
-rw-r--r-- | Command/Log.hs | 4 |
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 |