fixed datetime format bug