Skip to content

Commit

Permalink
Require time >= 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jan 9, 2024
1 parent 07e594d commit f1abdf2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion example-client/example-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ executable example-client
directory >= 1.2,
filepath >= 1.2,
optparse-applicative >= 0.11,
time >= 1.2,
time >= 1.5,
hackage-security >= 0.5,
hackage-security-HTTP,
hackage-security-curl,
Expand Down
2 changes: 1 addition & 1 deletion hackage-repo-tool/hackage-repo-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ executable hackage-repo-tool
bytestring >= 0.9 && < 0.13,
directory >= 1.2 && < 1.4,
filepath >= 1.3 && < 1.5,
time >= 1.4 && < 1.13
time >= 1.5 && < 1.13
if !os(windows)
build-depends: unix >= 2.5 && < 2.9

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/hackage-security.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ library
-- functionality, 0.5.0 changes type of serialise
tar >= 0.5 && < 0.7,
template-haskell >= 2.7 && < 2.22,
time >= 1.2 && < 1.13,
time >= 1.5 && < 1.13,
transformers >= 0.3 && < 0.7,
zlib >= 0.5 && < 0.7,
-- whatever versions are bundled with ghc:
Expand Down
8 changes: 0 additions & 8 deletions hackage-security/src/Hackage/Security/Util/JSON.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ import Text.JSON.Canonical
import Network.URI
import qualified Data.Map as Map

#if !MIN_VERSION_time(1,5,0)
import System.Locale (defaultTimeLocale)
#endif

import Hackage.Security.Util.Path

{-------------------------------------------------------------------------------
Expand Down Expand Up @@ -137,10 +133,6 @@ instance ReportSchemaErrors m => FromJSON m UTCTime where
case parseTimeM False defaultTimeLocale "%FT%TZ" str of
Just time -> return time
Nothing -> expected "valid date-time string" (Just str)
#if !MIN_VERSION_time(1,5,0)
where
parseTimeM _trim = parseTime
#endif

instance ( Monad m
, ToObjectKey m k
Expand Down

0 comments on commit f1abdf2

Please sign in to comment.