Copyright | (c) 2016 Herbert Valerio Riedel |
---|---|
License | BSD3 |
Safe Haskell | None |
Language | Haskell2010 |
Distribution.Client.IndexUtils.Timestamp
Description
Timestamp type used in package indexes
Synopsis
- data Timestamp
- nullTimestamp :: Timestamp
- epochTimeToTimestamp :: EpochTime -> Maybe Timestamp
- timestampToUTCTime :: Timestamp -> Maybe UTCTime
- utcTimeToTimestamp :: UTCTime -> Maybe Timestamp
- maximumTimestamp :: [Timestamp] -> Timestamp
Documentation
UNIX timestamp (expressed in seconds since unix epoch, i.e. 1970).
Instances
nullTimestamp :: Timestamp Source #
Special timestamp value to be used when timestamp
is
missingunknowninvalid
epochTimeToTimestamp :: EpochTime -> Maybe Timestamp Source #
timestampToUTCTime :: Timestamp -> Maybe UTCTime Source #
utcTimeToTimestamp :: UTCTime -> Maybe Timestamp Source #
maximumTimestamp :: [Timestamp] -> Timestamp Source #
Compute the maximum Timestamp
value
Returns nullTimestamp
for the empty list. Also note that
nullTimestamp
compares as smaller to all non-nullTimestamp
values.