time-1.4: A time library

Safe HaskellSafe-Infered

Data.Time.LocalTime.TimeZone

Contents

Synopsis

Time zones

data TimeZone Source

A TimeZone is a whole number of minutes offset from UTC, together with a name and a "just for summer" flag.

Constructors

TimeZone 

Fields

timeZoneMinutes :: Int

The number of minutes offset from UTC. Positive means local time will be later in the day than UTC.

timeZoneSummerOnly :: Bool

Is this time zone just persisting for the summer?

timeZoneName :: String

The name of the zone, typically a three- or four-letter acronym.

timeZoneOffsetString :: TimeZone -> StringSource

Text representing the offset of this timezone, such as "-0800" or "+0400" (like %z in formatTime)

timeZoneOffsetString' :: NumericPadOption -> TimeZone -> StringSource

Text representing the offset of this timezone, such as "-0800" or "+0400" (like %z in formatTime), with arbitrary padding

minutesToTimeZone :: Int -> TimeZoneSource

Create a nameless non-summer timezone for this number of minutes

hoursToTimeZone :: Int -> TimeZoneSource

Create a nameless non-summer timezone for this number of hours

utc :: TimeZoneSource

The UTC time zone

getTimeZone :: UTCTime -> IO TimeZoneSource

Get the local time-zone for a given time (varying as per summertime adjustments)

getCurrentTimeZone :: IO TimeZoneSource

Get the current time-zone