| Safe Haskell | Safe | 
|---|---|
| Language | Haskell2010 | 
Data.Time.LocalTime
Contents
- data TimeZone = TimeZone {}
 - timeZoneOffsetString :: TimeZone -> String
 - timeZoneOffsetString' :: Maybe Char -> TimeZone -> String
 - minutesToTimeZone :: Int -> TimeZone
 - hoursToTimeZone :: Int -> TimeZone
 - utc :: TimeZone
 - getTimeZone :: UTCTime -> IO TimeZone
 - getCurrentTimeZone :: IO TimeZone
 - data TimeOfDay = TimeOfDay {}
 - midnight :: TimeOfDay
 - midday :: TimeOfDay
 - makeTimeOfDayValid :: Int -> Int -> Pico -> Maybe TimeOfDay
 - utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)
 - localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)
 - timeToTimeOfDay :: DiffTime -> TimeOfDay
 - timeOfDayToTime :: TimeOfDay -> DiffTime
 - dayFractionToTimeOfDay :: Rational -> TimeOfDay
 - timeOfDayToDayFraction :: TimeOfDay -> Rational
 - data LocalTime = LocalTime {}
 - utcToLocalTime :: TimeZone -> UTCTime -> LocalTime
 - localTimeToUTC :: TimeZone -> LocalTime -> UTCTime
 - ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime
 - localTimeToUT1 :: Rational -> LocalTime -> UniversalTime
 - data ZonedTime = ZonedTime {}
 - utcToZonedTime :: TimeZone -> UTCTime -> ZonedTime
 - zonedTimeToUTC :: ZonedTime -> UTCTime
 - getZonedTime :: IO ZonedTime
 - utcToLocalZonedTime :: UTCTime -> IO ZonedTime
 
Time zones
A TimeZone is a whole number of minutes offset from UTC, together with a name and a "just for summer" flag.
Constructors
| TimeZone | |
Fields 
  | |
timeZoneOffsetString :: TimeZone -> String #
Text representing the offset of this timezone, such as "-0800" or "+0400" (like %z in formatTime).
timeZoneOffsetString' :: Maybe Char -> TimeZone -> String #
Text representing the offset of this timezone, such as "-0800" or "+0400" (like %z in formatTime), with arbitrary padding.
minutesToTimeZone :: Int -> TimeZone #
Create a nameless non-summer timezone for this number of minutes.
hoursToTimeZone :: Int -> TimeZone #
Create a nameless non-summer timezone for this number of hours.
getTimeZone :: UTCTime -> IO TimeZone #
Get the local time-zone for a given time (varying as per summertime adjustments).
getCurrentTimeZone :: IO TimeZone #
Get the current time-zone.
Time of day
Time of day as represented in hour, minute and second (with picoseconds), typically used to express local time of day.
Constructors
| TimeOfDay | |
utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay) #
Convert a time of day in UTC to a time of day in some timezone, together with a day adjustment.
localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay) #
Convert a time of day in some timezone to a time of day in UTC, together with a day adjustment.
timeToTimeOfDay :: DiffTime -> TimeOfDay #
Get the time of day given a time since midnight. Time more than 24h will be converted to leap-seconds.
timeOfDayToTime :: TimeOfDay -> DiffTime #
Get the time since midnight for a given time of day.
dayFractionToTimeOfDay :: Rational -> TimeOfDay #
Get the time of day given the fraction of a day since midnight.
timeOfDayToDayFraction :: TimeOfDay -> Rational #
Get the fraction of a day since midnight given a time of day.
Local Time
A simple day and time aggregate, where the day is of the specified parameter, and the time is a TimeOfDay. Conversion of this (as local civil time) to UTC depends on the time zone. Conversion of this (as local mean time) to UT1 depends on the longitude.
Constructors
| LocalTime | |
Fields 
  | |
utcToLocalTime :: TimeZone -> UTCTime -> LocalTime #
Get the local time of a UTC time in a time zone.
localTimeToUTC :: TimeZone -> LocalTime -> UTCTime #
Get the UTC time of a local time in a time zone.
ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime #
Get the local time of a UT1 time on a particular meridian (in degrees, positive is East).
localTimeToUT1 :: Rational -> LocalTime -> UniversalTime #
Get the UT1 time of a local time on a particular meridian (in degrees, positive is East).
A local time together with a time zone.
Constructors
| ZonedTime | |
Fields  | |
utcToZonedTime :: TimeZone -> UTCTime -> ZonedTime #
zonedTimeToUTC :: ZonedTime -> UTCTime #
getZonedTime :: IO ZonedTime #
utcToLocalZonedTime :: UTCTime -> IO ZonedTime #