Provides access to the Olson zone-info database, using an adapted version
- type Context = ForeignPtr CContext
- 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
- newContext :: Maybe String -> IO Context
- newOlsonZone :: Context -> String -> IO OlsonZone
- utcOlsonZone :: Context -> OlsonZone
Documentation
type Context = ForeignPtr CContextSource
Library context.
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 :: Context -> String -> IO OlsonZoneSource
utcOlsonZone :: Context -> OlsonZoneSource
OlsonZone
for the UTC time-zone.