fix time calc stmt