Fix the DateTime logic in test.

- This test started to fail on some systems with daylight saving time change.