Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
Documentation
posixDayLength :: NominalDiffTime Source #
The nominal length of a POSIX day: 86400 SI seconds.
type POSIXTime = NominalDiffTime Source #
The nominal (ignoring leap seconds) time difference since midnight
1970-01-01, the Unix epoch. Equvialent to a normalised
struct timeval
.
posixTime :: Iso' UTCTime POSIXTime Source #
Control.Lens.Iso between UTCTime
and POSIXTime
.
>getPOSIXTime
1459515013.527711s >review
posixTime
<$>
getPOSIXTime
2016-01-01 12:50:45.588729 UTC
getPOSIXTime :: IO POSIXTime Source #
Return the current system POSIX time via
gettimeofday
,
or getSystemTimeAsFileTime
on Windows.
See also getCurrentTime
, getZonedTime
.
Compatibility
posixSecondsToUTCTime :: POSIXTime -> UTCTime Source #
Construct a UTCTime
from a POSIXTime
.
posixSecondsToUTCTime
=review
posixTime
posixSecondsToUTCTime
t ≡posixTime
#
t
utcTimeToPOSIXSeconds :: UTCTime -> POSIXTime Source #
Convert a UTCTime
to a POSIXTime
.
utcTimeToPOSIXSeconds
=view
posixTime