date time fixes and test cases
Merge pull request #1 from williecheong/master

date time fixes and test cases