| Maintainer | [email protected] |
|---|---|
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Distribution.Hackage.DB.Utility
Description
Synopsis
- parseText :: Parsec a => String -> String -> a
- fromEpochTime :: EpochTime -> UTCTime
- toEpochTime :: UTCTime -> EpochTime
- parseIso8601 :: MonadFail m => String -> m UTCTime
Documentation
fromEpochTime :: EpochTime -> UTCTime Source #
toEpochTime :: UTCTime -> EpochTime Source #
parseIso8601 :: MonadFail m => String -> m UTCTime Source #
Parse an UTC timestamp in extended ISO8601 format a standard UTCTime
type. This function is useful to parse the "snapshot" identifier printed by
cabal-install after a database update into a useable type. Combine with
toEpochTime to obtain an EpochTime that can be passed to the Hackage DB
reading code from this library.
>>>parseIso8601 "2018-12-21T13:17:40Z"2018-12-21 13:17:40 UTC