Commit f6cea70a authored by dterei's avatar dterei
Browse files

Fix T5430, make output independent of user timezone

parent 3d52fa8f
......@@ -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!
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment