Moving time calculation earlier