getCurrentLocalTime

This commit is contained in:
Simon Michael 2009-01-25 06:47:05 +00:00
parent aa607b1297
commit 415c48d855

View File

@ -233,6 +233,13 @@ spacenonewline = satisfy (\c -> c `elem` " \v\f\t")
restofline :: GenParser Char st String
restofline = anyChar `manyTill` newline
-- time
getCurrentLocalTime :: IO LocalTime
getCurrentLocalTime = do
t <- getCurrentTime
tz <- getCurrentTimeZone
return $ utcToLocalTime tz t