diff options
author | Joris | 2016-10-30 21:19:06 +0100 |
---|---|---|
committer | Joris | 2016-10-30 21:19:06 +0100 |
commit | bf6a0a0b32a7efb88f75c2e89b84d6907aeb10bc (patch) | |
tree | 54ad7c0616e4b2263c8c0aa419236fe9346db388 /src | |
parent | a0ee1260e7efaf6248df9445d4d7165e2fc16cae (diff) |
Use the timezone of the time and not the timezone of now
Diffstat (limited to 'src')
-rw-r--r-- | src/server/Utils/Time.hs | 4 |
1 files changed, 1 insertions, 3 deletions
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 = |