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

Moduleold-time-1.1.0.4Haskell2010

System.Time

The standard time library from Haskell 98. This library is deprecated, please look at Data.Time in the time package instead.

System.Time provides functionality for clock times, including timezone information (i.e, the functionality of "time.h", adapted to the Haskell environment). It follows RFC 1129 in its use of Coordinated Universal Time (UTC).

  • 5 types
  • 12 values
  • Packageold-time-1.1.0.4
  • Exports17
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTime.hsc

Clock times

2 declarations
datadata ClockTime
#

A representation of the internal clock time. Clock times may be compared, converted to strings, or converted to an external calendar time CalendarTime for I/O or other manipulations.

Constructors

  • TOD Integer Integer

    Construct a clock time. The arguments are a number of seconds since 00:00:00 (UTC) on 1 January 1970, and an additional number of picoseconds.

    In Haskell 98, the ClockTime type is abstract.

Instances3Eq, Ord, Show

Time differences

7 declarations

Calendar times

8 declarations
datadata CalendarTime
#

CalendarTime is a user-readable and manipulable representation of the internal ClockTime type.

Constructors

Instances4Eq, Ord, Read, Show
datadata Month
#
Instances7Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded MonthDefined in old-time-1.1.0.4 · System.Time
  • Enum MonthDefined in old-time-1.1.0.4 · System.Time
  • Eq MonthDefined in old-time-1.1.0.4 · System.Time
  • Ord MonthDefined in old-time-1.1.0.4 · System.Time
  • Read MonthDefined in old-time-1.1.0.4 · System.Time
  • Show MonthDefined in old-time-1.1.0.4 · System.Time
  • Ix MonthDefined in old-time-1.1.0.4 · System.Time

converts an internal clock time to a local time, modified by the timezone and daylight savings time settings in force at the time of conversion. Because of this dependence on the local environment, toCalendarTime is in the IO monad.