Fix time format bug