[commit: packages/time] ghc, master: test unix: fix time-zone test (231ea48)
git at git.haskell.org
git at git.haskell.org
Fri Apr 21 16:57:39 UTC 2017
Repository : ssh://git@git.haskell.org/time
On branches: ghc,master
Link : http://git.haskell.org/packages/time.git/commitdiff/231ea4820159f247a1536abc9e9a2861c103ea3b
>---------------------------------------------------------------
commit 231ea4820159f247a1536abc9e9a2861c103ea3b
Author: Ashley Yakeley <ashley at yakeley.org>
Date: Fri Mar 10 11:33:31 2017 -0800
test unix: fix time-zone test
>---------------------------------------------------------------
231ea4820159f247a1536abc9e9a2861c103ea3b
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"
More information about the ghc-commits
mailing list