Provides access to the Olson zone-info database, using an adapted version of the Olson zone-info library.
- type Olson = ForeignPtr COlson
- type ZoneInfo = (Olson, Ptr CZoneInfo)
- newOlson :: Maybe String -> IO Olson
- getZoneInfo :: Olson -> String -> IO ZoneInfo
- utcZoneInfo :: Olson -> ZoneInfo
- getZoneName :: ZoneInfo -> Bool -> IO String
- getZoneMinutes :: ZoneInfo -> Bool -> IO Int
- posixToZonedTime :: ZoneInfo -> POSIXTime -> IO ZonedTime
- utcToZonedTime' :: ZoneInfo -> UTCTime -> IO ZonedTime
- localToPOSIXZoned :: ZoneInfo -> LocalTime -> IO (POSIXTime, ZonedTime)
- localToUTCZoned :: ZoneInfo -> LocalTime -> IO (UTCTime, ZonedTime)
- convertTimeZone :: ZoneInfo -> LocalTime -> ZoneInfo -> IO ZonedTime
Documentation
type Olson = ForeignPtr COlsonSource
utcZoneInfo :: Olson -> ZoneInfoSource
ZoneInfo
for the UTC time-zone.
getZoneName :: ZoneInfo -> Bool -> IO StringSource
Returns the zone-name for either the standard or daylight saving zone,
depending on the isdst
argument.
getZoneMinutes :: ZoneInfo -> Bool -> IO IntSource
Returns the UTC offset for either the standard or daylight saving zone,
depending on the isdst
argument.
localToPOSIXZoned :: ZoneInfo -> LocalTime -> IO (POSIXTime, ZonedTime)Source
Convert LocalTime
to a daylight saving adjusted pair.