Fixing flaky datetime tests