fix date and time setting on file upload and text writing