fixed datetime comparison errors in tests