From bf6a0a0b32a7efb88f75c2e89b84d6907aeb10bc Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 30 Oct 2016 21:19:06 +0100 Subject: Use the timezone of the time and not the timezone of now --- src/server/Utils/Time.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/server') diff --git a/src/server/Utils/Time.hs b/src/server/Utils/Time.hs index e8c7ac1..170ab36 100644 --- a/src/server/Utils/Time.hs +++ b/src/server/Utils/Time.hs @@ -14,9 +14,7 @@ belongToCurrentMonth time = do return (timeMonth == actualMonth) timeToDay :: UTCTime -> IO Day -timeToDay time = do - timeZone <- getCurrentTimeZone - return . localDay $ utcToLocalTime timeZone time +timeToDay time = localDay . (flip utcToLocalTime time) <$> getTimeZone time dayMonth :: Day -> Int dayMonth day = -- cgit v1.2.3