Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f76da0591a7b0de8b26e59df44bcbb4b4e39037a

>---------------------------------------------------------------

commit f76da0591a7b0de8b26e59df44bcbb4b4e39037a
Author: David Terei <[email protected]>
Date:   Thu Jan 12 16:31:21 2012 -0800

    Fix T5430, make output independent of user timezone

>---------------------------------------------------------------

 tests/lib/Time/T5430.hs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/lib/Time/T5430.hs b/tests/lib/Time/T5430.hs
index b011ed6..28353d8 100644
--- a/tests/lib/Time/T5430.hs
+++ b/tests/lib/Time/T5430.hs
@@ -3,6 +3,12 @@ import System.Locale
 import System.Time
 
 main :: IO ()
-main = do let clockTime = TOD 0 0 -- 00:00:00 on 1 Jan 1970
+main = do let clockTime = TOD 32400 0 -- 00:00:00 on 1 Jan 1970
           calTime <- toCalendarTime clockTime
-          putStrLn $ formatCalendarTime defaultTimeLocale "%j" calTime
+          -- We check for 001 or 365 (timezone locale will determine which one)
+          -- and output 001 for testing output consistently.
+          putStrLn $ case (formatCalendarTime defaultTimeLocale "%j" calTime) 
of
+                         "001" -> "001" -- good!
+                         "365" -> "001" -- good!
+                         n     -> n     -- error!
+



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to