fix some defects , and refine datetime model