fix bug and refactor

1. remove writeString() in DateTime and make adjustment accordingly in
XmlWriter
2. modify DateTime toString() method.