fixed bug caused by lack of precision of DateTime