Fix datetime format to make it acceptable by wtforms.