From 3323bf4ae9062481bfeeda6d3ba2ce971dc58dca Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 28 Oct 2022 23:58:02 -0400 Subject: [PATCH] Set date in test to fixed one (#81175) --- tests/components/history_stats/test_sensor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/components/history_stats/test_sensor.py b/tests/components/history_stats/test_sensor.py index b384b7c730..6bae61b5fd 100644 --- a/tests/components/history_stats/test_sensor.py +++ b/tests/components/history_stats/test_sensor.py @@ -1388,7 +1388,9 @@ async def test_measure_cet(recorder_mock, hass): async def test_end_time_with_microseconds_zeroed(time_zone, recorder_mock, hass): """Test the history statistics sensor that has the end time microseconds zeroed out.""" hass.config.set_time_zone(time_zone) - start_of_today = dt_util.now().replace(hour=0, minute=0, second=0, microsecond=0) + start_of_today = dt_util.now().replace( + day=9, month=7, year=1986, hour=0, minute=0, second=0, microsecond=0 + ) start_time = start_of_today + timedelta(minutes=60) t0 = start_time + timedelta(minutes=20) t1 = t0 + timedelta(minutes=10)