format everything with hindent
[packages/time.git] / test / unix / Test / LocalTime / TimeZone.hs
1 module Test.LocalTime.TimeZone
2 ( testTimeZone
3 ) where
4
5 import Data.Time
6 import System.Posix.Env (putEnv)
7 import Test.Tasty
8 import Test.Tasty.HUnit
9
10 testTimeZone :: TestTree
11 testTimeZone =
12 testCase "getTimeZone respects TZ env var" $ do
13 let epoch = UTCTime (ModifiedJulianDay 57000) 0
14 putEnv "TZ=UTC+0"
15 zone1 <- getTimeZone epoch
16 putEnv "TZ=EST+5"
17 zone2 <- getTimeZone epoch
18 assertBool "zone not changed" $ zone1 /= zone2