Data.Time.Clock.POSIX

time-1.8.0.2: A time library

Safe Haskell | Safe
Language | Haskell2010

Data.Time.Clock.POSIX

Description

POSIX time, if you need to deal with timestamps and the like. Most people won't need this module.

Synopsis

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

# Documentation

posixDayLength :: NominalDiffTime Source #

86400 nominal seconds in every day

type POSIXTime = NominalDiffTime Source #

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

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

posixSecondsToUTCTime :: POSIXTime -> UTCTime Source #

utcTimeToPOSIXSeconds :: UTCTime -> POSIXTime Source #

getPOSIXTime :: IO POSIXTime Source #

Get the current POSIX time from the system clock.

getCurrentTime :: IO UTCTime Source #

Get the current `UTCTime` from the system clock.

systemToPOSIXTime :: SystemTime -> POSIXTime Source #