From 231ea4820159f247a1536abc9e9a2861c103ea3b Mon Sep 17 00:00:00 2001 From: Ashley Yakeley <ashley@yakeley.org> Date: Fri, 10 Mar 2017 11:33:31 -0800 Subject: [PATCH] test unix: fix time-zone test --- lib/Data/Time/LocalTime/Internal/TimeZone.hs | 2 +- test/unix/Test/LocalTime/TimeZone.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Data/Time/LocalTime/Internal/TimeZone.hs b/lib/Data/Time/LocalTime/Internal/TimeZone.hs index e09a248..e2b2f49 100644 --- a/lib/Data/Time/LocalTime/Internal/TimeZone.hs +++ b/lib/Data/Time/LocalTime/Internal/TimeZone.hs @@ -101,7 +101,7 @@ toCTime t = let tt = fromIntegral t t' = fromIntegral tt -- there's no instance Bounded CTime, so this is the easiest way to check for overflow - in if t' == t then return $ CTime tt else fail "Data.Time.LocalTime.Internal.TimeZone.toCTime: Overflow" where + in if t' == t then return $ CTime tt else fail "Data.Time.LocalTime.Internal.TimeZone.toCTime: Overflow" -- | Get the local time-zone for a given time (varying as per summertime adjustments). getTimeZoneSystem :: SystemTime -> IO TimeZone diff --git a/test/unix/Test/LocalTime/TimeZone.hs b/test/unix/Test/LocalTime/TimeZone.hs index 22a5bbb..ca55b25 100644 --- a/test/unix/Test/LocalTime/TimeZone.hs +++ b/test/unix/Test/LocalTime/TimeZone.hs @@ -9,7 +9,7 @@ import Test.Tasty.HUnit testTimeZone :: TestTree testTimeZone = testCase "getTimeZone respects TZ env var" $ do - let epoch = UTCTime (ModifiedJulianDay 0) 0 + let epoch = UTCTime (ModifiedJulianDay 57000) 0 putEnv "TZ=UTC+0" zone1 <- getTimeZone epoch putEnv "TZ=EST+5" -- GitLab