From d76b7995f0beeb245e9295ae13906483d0731b5b Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 18 Mar 2016 05:38:03 +0100 Subject: [PATCH] fixed recharge error --- Handler/Select.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Handler/Select.hs b/Handler/Select.hs index c22efa5..b88a832 100644 --- a/Handler/Select.hs +++ b/Handler/Select.hs @@ -17,7 +17,6 @@ module Handler.Select where import Import import Handler.Common -import qualified Text.Read as R import qualified Data.Text as T import Data.Maybe @@ -69,9 +68,8 @@ postRechargeR uId = do redirect $ RechargeR uId else do updateCashier amount ("Guthaben: " `T.append` userIdent user) - time <- liftIO getCurrentTime - let secs = R.read $ formatTime defaultTimeLocale "%s" time - runDB $ update uId [UserBalance +=. amount, UserTimestamp =. secs] + today <- liftIO $ return . utctDay =<< getCurrentTime + runDB $ update uId [UserBalance +=. amount, UserTimestamp =. today] setMessageI MsgRecharged redirect HomeR _ -> do