We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69d2083 commit c53cc7fCopy full SHA for c53cc7f
tests/cli/scheduler/test_task_delays.py
@@ -22,15 +22,16 @@ def test_should_run_success() -> None:
22
23
24
def test_should_run_cron_str_offset() -> None:
25
- hour = datetime.datetime.now().hour
+ timezone = ZoneInfo("Europe/Paris")
26
+ hour = datetime.datetime.now(tz=timezone).hour
27
delay = get_task_delay(
28
ScheduledTask(
29
task_name="",
30
labels={},
31
args=[],
32
kwargs={},
33
cron=f"* {hour} * * *",
- cron_offset=str(ZoneInfo("Europe/Paris")),
34
+ cron_offset=str(timezone),
35
),
36
)
37
assert delay is not None and delay >= 0
0 commit comments