Data.Time.Clock.POSIX.Compat

time-compat-1.9.8: Compatibility package for time

Safe Haskell | Trustworthy
Language | Haskell2010

Data.Time.Clock.POSIX.Compat

Synopsis

- posixDayLength :: NominalDiffTime
- type POSIXTime = NominalDiffTime
- posixSecondsToUTCTime :: POSIXTime -> UTCTime
- utcTimeToPOSIXSeconds :: UTCTime -> POSIXTime
- getPOSIXTime :: IO POSIXTime
- getCurrentTime :: IO UTCTime
- systemToPOSIXTime :: SystemTime -> POSIXTime

# Documentation

posixDayLength :: NominalDiffTime #

86400 nominal seconds in every day

type POSIXTime = NominalDiffTime #

POSIX time is the nominal time since 1970-01-01 00:00 UTC

To convert from a `CTime` or `System.Posix.EpochTime`, use `realToFrac`.

posixSecondsToUTCTime :: POSIXTime -> UTCTime #

utcTimeToPOSIXSeconds :: UTCTime -> POSIXTime #

getPOSIXTime :: IO POSIXTime #

Get the current POSIX time from the system clock.

getCurrentTime :: IO UTCTime #

Get the current `UTCTime` from the system clock.

systemToPOSIXTime :: SystemTime -> POSIXTime #