time-compat-1.9.2.2: Compatibility package for time

Safe HaskellTrustworthy
LanguageHaskell2010

Data.Time.Clock.System.Compat

Synopsis

Documentation

systemEpochDay :: Day #

The day of the epoch of SystemTime, 1970-01-01

data SystemTime #

SystemTime is time returned by system clock functions. Its semantics depends on the clock function, but the epoch is typically the beginning of 1970. Note that systemNanoseconds of 1E9 to 2E9-1 can be used to represent leap seconds.

truncateSystemTimeLeapSecond :: SystemTime -> SystemTime #

Map leap-second values to the start of the following second. The resulting systemNanoseconds will always be in the range 0 to 1E9-1.

getSystemTime :: IO SystemTime #

Get the system time, epoch start of 1970 UTC, leap-seconds ignored. getSystemTime is typically much faster than getCurrentTime.

systemToUTCTime :: SystemTime -> UTCTime #

Convert SystemTime to UTCTime, matching zero SystemTime to midnight of systemEpochDay UTC.

utcToSystemTime :: UTCTime -> SystemTime #

Convert UTCTime to SystemTime, matching zero SystemTime to midnight of systemEpochDay UTC.

systemToTAITime :: SystemTime -> AbsoluteTime #

Convert SystemTime to AbsoluteTime, matching zero SystemTime to midnight of systemEpochDay TAI.