Data.Time.ZoneInfo
Description
Provides access to the Olson zone-info database, using an adapted version of the Olson zone-info library.
- type Olson = ForeignPtr COlson
- class ZoneInfo a where
- zoneInfoName :: a -> Bool -> IO String
- zoneInfoMinutes :: a -> Bool -> IO Int
- posixToZonedTime :: a -> POSIXTime -> IO ZonedTime
- utcToZonedTime' :: a -> UTCTime -> IO ZonedTime
- localToPOSIXZoned :: a -> LocalTime -> IO (POSIXTime, TimeZone)
- localToUTCZoned :: a -> LocalTime -> IO (UTCTime, TimeZone)
- convertTimeZone :: ZoneInfo b => a -> LocalTime -> b -> IO ZonedTime
- newOlson :: Maybe String -> IO Olson
- newOlsonZone :: Olson -> String -> IO OlsonZone
- utcOlsonZone :: Olson -> OlsonZone
Documentation
type Olson = ForeignPtr COlsonSource
Methods
zoneInfoName :: a -> Bool -> IO StringSource
Returns the zone-name for either the standard or daylight saving
zone, depending on the isdst boolean argument; an IOError will be
thrown if this information is unavailable.
zoneInfoMinutes :: a -> Bool -> IO IntSource
Returns the UTC offset for either the standard or daylight saving
zone, depending on the isdst boolean argument; an IOError will be
thrown if this information is unavailable.
posixToZonedTime :: a -> POSIXTime -> IO ZonedTimeSource
utcToZonedTime' :: a -> UTCTime -> IO ZonedTimeSource
localToPOSIXZoned :: a -> LocalTime -> IO (POSIXTime, TimeZone)Source
Convert LocalTime to a daylight saving adjusted pair.
localToUTCZoned :: a -> LocalTime -> IO (UTCTime, TimeZone)Source
Convert LocalTime to a daylight saving adjusted pair.
convertTimeZone :: ZoneInfo b => a -> LocalTime -> b -> IO ZonedTimeSource
newOlsonZone :: Olson -> String -> IO OlsonZoneSource
utcOlsonZone :: Olson -> OlsonZoneSource
OlsonZone for the UTC time-zone.