Moduletime-compat-1.9.9
Data.Time.Clock.Compat
- 7 types
- 10 values
- Packagetime-compat-1.9.9
- Exports22
- LicenceBSD-3-Clause
- SourceDiffTime.hs
Get the number of picoseconds in a DiffTime.
Create a DiffTime from a number of picoseconds.
Create a DiffTime which represents an integral number of seconds.
convert from DiffTime
One day in NominalDiffTime.
Get the seconds in a NominalDiffTime.
Create a NominalDiffTime from a number of seconds.
The resolution of getSystemTime, getCurrentTime, getPOSIXTime.
On UNIX systems this uses clock_getres, which may be wrong on WSL2.
addUTCTime a b = a + b
diffUTCTime a b = a - b
Get the current UTCTime from the system clock.
Day of month, in range 1 to 31.
Month of year, in range 1 (January) to 12 (December).
Year of Common Era (when positive).
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.16.0.1 · Data.Time.Clock.Internal.DiffTimeEq DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeFractional DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeData DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeNum DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeOrd DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeRead DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeReal DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeRealFrac DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeShow DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeNFData DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTimeFormatTime DiffTimeDefined in time-1.16.0.1 · Data.Time.Format.Format.Instances · orphanParseTime DiffTimeDefined in time-1.16.0.1 · Data.Time.Format.Parse.Instances · orphanHashable DiffTimeDefined in time-compat-1.9.9 · Data.Time.Orphans · orphanLift DiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.DiffTime
This is a length of time, as measured by UTC. It has a precision of one picosecond (10^-12 s).
Conversion functions such as fromInteger and realToFrac will treat it as seconds.
For example, (0.010 :: NominalDiffTime) corresponds to 10 milliseconds.
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, …
Enum NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeEq NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeFractional NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeData NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeNum NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeOrd NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeRead NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeReal NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeRealFrac NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeShow NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeNFData NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTimeFormatTime NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Format.Format.Instances · orphanParseTime NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Format.Parse.Instances · orphanHashable NominalDiffTimeDefined in time-compat-1.9.9 · Data.Time.Orphans · orphanLift NominalDiffTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.NominalDiffTime
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
UTCTimeutctDay :: Daythe day
utctDayTime :: DiffTimethe time from midnight, 0 <= t < 86401s (because of leap-seconds)
Instances13Eq, Data, Ord, Read, Show, Generic, …
Eq UTCTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UTCTimeData UTCTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UTCTimeOrd UTCTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UTCTimeRead UTCTimeDefined in time-1.16.0.1 · Data.Time.Format.Parse · orphanShow UTCTimeDefined in time-1.16.0.1 · Data.Time.LocalTime.Internal.ZonedTime · orphanGeneric UTCTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UTCTimeNFData UTCTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UTCTimeFormatTime UTCTimeDefined in time-1.16.0.1 · Data.Time.Format.Format.Instances · orphanParseTime UTCTimeDefined in time-1.16.0.1 · Data.Time.Format.Parse.Instances · orphanISO8601 UTCTimeDefined in time-1.16.0.1 · Data.Time.Format.ISO8601yyyy-mm-ddThh:mm:ss[.ss]Z[ISO 8601:2004(E) sec. 4.3.2 extended format]Hashable UTCTimeDefined in time-compat-1.9.9 · Data.Time.Orphans · orphanLift UTCTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UTCTimetype Rep UTCTime = D1 ('MetaDataDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UTCTime"UTCTime"
"Data.Time.Clock.Internal.UTCTime"
"time-1.16.0.1-ac1b"
'False) (C1 ('MetaCons"UTCTime"
'PrefixI 'True) (S1 ('MetaSel ('Just"utctDay"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Just"utctDayTime"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DiffTime)))
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.
Constructors
Instances12Eq, Data, Ord, Read, Show, Generic, …
Eq UniversalTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UniversalTimeData UniversalTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UniversalTimeOrd UniversalTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UniversalTimeRead UniversalTimeDefined in time-1.16.0.1 · Data.Time.Format.Parse · orphanShow UniversalTimeDefined in time-1.16.0.1 · Data.Time.LocalTime.Internal.LocalTime · orphanGeneric UniversalTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UniversalTimeNFData UniversalTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UniversalTimeFormatTime UniversalTimeDefined in time-1.16.0.1 · Data.Time.Format.Format.Instances · orphanParseTime UniversalTimeDefined in time-1.16.0.1 · Data.Time.Format.Parse.Instances · orphanHashable UniversalTimeDefined in time-compat-1.9.9 · Data.Time.Orphans · orphanLift UniversalTimeDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UniversalTimetype Rep UniversalTime = D1 ('MetaDataDefined in time-1.16.0.1 · Data.Time.Clock.Internal.UniversalTime"UniversalTime"
"Data.Time.Clock.Internal.UniversalTime"
"time-1.16.0.1-ac1b"
'True) (C1 ('MetaCons"ModJulianDate"
'PrefixI 'True) (S1 ('MetaSel ('Just"getModJulianDate"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational)))