module Data.HodaTime.TimeZone
(
TimeZone
,utc
,localZone
,timeZone
,availableZones
)
where
import Data.HodaTime.TimeZone.Internal
import Data.HodaTime.TimeZone.Platform
utc :: IO TimeZone
utc :: IO TimeZone
utc = do
(utcM, calDateM) <- IO (UtcTransitionsMap, CalDateTransitionsMap)
loadUTC
return $ TimeZone UTC utcM calDateM
timeZone :: String -> IO TimeZone
timeZone :: String -> IO TimeZone
timeZone String
tzName = do
(utcM, calDateM) <- String -> IO (UtcTransitionsMap, CalDateTransitionsMap)
loadTimeZone String
tzName
return $ TimeZone (Zone tzName) utcM calDateM
localZone :: IO TimeZone
localZone :: IO TimeZone
localZone = do
(utcM, calDateM, tzName) <- IO (UtcTransitionsMap, CalDateTransitionsMap, String)
loadLocalZone
return $ TimeZone (Zone tzName) utcM calDateM
availableZones :: IO [String]
availableZones :: IO [String]
availableZones = IO [String]
loadAvailableZones