Change date format and fixed a date update bug