HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulerebase-1.21.2Haskell2010

Rebase.Data.Time.Clock

  • 4 types
  • 10 values
  • Packagerebase-1.21.2
  • Exports14
  • LanguageHaskell2010
  • LicenceMIT
  • SourceDiffTime.hs
newtypenewtype DiffTime
#

This is a length of time, as measured by a clock. Conversion functions such as fromInteger and realToFrac will treat it as seconds. For example, (0.010 :: DiffTime) corresponds to 10 milliseconds.

It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.

Instances15Enum, Eq, Fractional, Data, Num, Ord, …
  • Enum DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Eq DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Fractional DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Data DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Num DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Ord DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Read DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Real DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • RealFrac DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Show DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • NFData DiffTimeDefined in time-1.12.2 · Data.Time.Clock.Internal.DiffTime
  • Hashable DiffTimeDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
  • FormatTime DiffTimeDefined in time-1.12.2 · Data.Time.Format.Format.Instances · orphan
  • ParseTime DiffTimeDefined in time-1.12.2 · Data.Time.Format.Parse.Instances · orphan
  • Lift DiffTimeDefined in time-compat-1.9.8 · Data.Time.Orphans · orphan
newtypenewtype NominalDiffTime
#

This is a length of time, as measured by UTC. It has a precision of 10^-12 s.

Conversion functions such as fromInteger and realToFrac will treat it as seconds. For example, (0.010 :: NominalDiffTime) corresponds to 10 milliseconds.

It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.

It ignores leap-seconds, so it's not necessarily a fixed amount of clock time. For instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1 day), regardless of whether a leap-second intervened.

Instances15Enum, Eq, Fractional, Data, Num, Ord, …
datadata UTCTime
#

This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.

Constructors

Instances13Eq, Data, Ord, Read, Show, Generic, …
newtypenewtype UniversalTime
#

The Modified Julian Date is the day with the fraction of the day, measured from UT midnight. It's used to represent UT1, which is time as measured by the earth's rotation, adjusted for various wobbles.

Instances12Eq, Data, Ord, Read, Show, Generic, …