1 diff -rN -u old-mbox/Data/MBox/String.hs new-mbox/Data/MBox/String.hs
2 --- old-mbox/Data/MBox/String.hs 2022-11-22 19:14:52.332543098 +0100
3 +++ new-mbox/Data/MBox/String.hs 2022-11-22 19:14:52.332543098 +0100
7 -----------------------------------------------------------------------------
10 -- | Reads a date header as a UTCTime
11 parseDateHeader :: String -> Maybe UTCTime
12 parseDateHeader header = listToMaybe . catMaybes $ map tryParse formats where
13 +#if MIN_VERSION_time(1,9,0)
14 + tryParse f = parseTimeM True LC.defaultTimeLocale f header
16 tryParse f = parseTime LC.defaultTimeLocale f header
19 [ "%a, %_d %b %Y %T %z"
20 , "%a, %_d %b %Y %T %Z"
21 diff -rN -u old-mbox/Data/MBox.hs new-mbox/Data/MBox.hs
22 --- old-mbox/Data/MBox.hs 2022-11-22 19:14:52.332543098 +0100
23 +++ new-mbox/Data/MBox.hs 2022-11-22 19:14:52.332543098 +0100
26 {-# LANGUAGE ViewPatterns #-}
28 -----------------------------------------------------------------------------
30 parseDateHeader :: T.Text -> Maybe UTCTime
31 parseDateHeader txt = listToMaybe . catMaybes $ map tryParse formats where
33 +#if MIN_VERSION_time(1,9,0)
34 + tryParse f = parseTimeM True LC.defaultTimeLocale f header
36 tryParse f = parseTime LC.defaultTimeLocale f header
39 [ "%a, %_d %b %Y %T %z"
40 , "%a, %_d %b %Y %T %Z"
41 diff -rN -u old-mbox/mbox.cabal new-mbox/mbox.cabal
42 --- old-mbox/mbox.cabal 2022-11-22 19:14:52.332543098 +0100
43 +++ new-mbox/mbox.cabal 2022-11-22 19:14:52.332543098 +0100
48 - build-depends: base >= 4, base < 6, safe, time < 1.9, time-locale-compat, text
49 + build-depends: base >= 4, base < 6, safe, time, time-locale-compat, text
50 exposed-modules: Data.MBox, Data.MBox.String