Fix deserialize method in DateTime and Date unit types.
Add basic tests to simple unit types.