fix datetime attributes