Fix some stuffs about time.