Fixed time problem by using server time