fix date and time bug and formats