fix the bug for time