W3cubDocs

/Haskell 9

Data.Time.Clock.TAI

Safe Haskell Safe
Language Haskell2010

Contents

Description

TAI and leap-second maps for converting to UTC: most people won't need this module.

addAbsoluteTime :: DiffTime -> AbsoluteTime -> AbsoluteTime Source

addAbsoluteTime a b = a + b

diffAbsoluteTime :: AbsoluteTime -> AbsoluteTime -> DiffTime Source

diffAbsoluteTime a b = a - b

taiEpoch :: AbsoluteTime Source

The epoch of TAI, which is 1858-11-17 00:00:00 TAI.

taiNominalDayStart :: Day -> AbsoluteTime Source

data AbsoluteTime Source

AbsoluteTime is TAI, time as measured by a clock.

Instances
Instances details
NFData AbsoluteTime Source
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Methods

rnf :: AbsoluteTime -> () Source

Data AbsoluteTime Source
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AbsoluteTime -> c AbsoluteTime

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AbsoluteTime

toConstr :: AbsoluteTime -> Constr

dataTypeOf :: AbsoluteTime -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AbsoluteTime)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AbsoluteTime)

gmapT :: (forall b. Data b => b -> b) -> AbsoluteTime -> AbsoluteTime

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AbsoluteTime -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AbsoluteTime -> r

gmapQ :: (forall d. Data d => d -> u) -> AbsoluteTime -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> AbsoluteTime -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AbsoluteTime -> m AbsoluteTime

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AbsoluteTime -> m AbsoluteTime

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AbsoluteTime -> m AbsoluteTime

Show AbsoluteTime Source
Instance details

Defined in Data.Time.Clock.TAI

Eq AbsoluteTime Source
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Ord AbsoluteTime Source
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Lift AbsoluteTime Source
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Methods

lift :: Quote m => AbsoluteTime -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => AbsoluteTime -> Code m AbsoluteTime

type LeapSecondMap = Day -> Maybe Int Source

TAI - UTC during this day. No table is provided, as any program compiled with it would become out of date in six months.

utcDayLength :: LeapSecondMap -> Day -> Maybe DiffTime Source

utcToTAITime :: LeapSecondMap -> UTCTime -> Maybe AbsoluteTime Source

taiToUTCTime :: LeapSecondMap -> AbsoluteTime -> Maybe UTCTime Source

taiClock :: Maybe (DiffTime, IO AbsoluteTime) Source

TAI clock, if it exists. Note that it is unlikely to be set correctly, without due care and attention.

Orphan instances

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.12.1/docs/libraries/time-1.14-40b8/Data-Time-Clock-TAI.html