wenbo - change the time logic