Airflow всегда отображал «Следующий запуск» как вчерашний перед сегодняшним запуском, а когда сегодняшний запуск будет завершен, он будет отображать «Следующий запуск» как сегодняшнюю дату. Для «Последнего запуска» это всегда было позавчера, если сегодняшний запуск не запускается. Как только сегодняшний забег завершится, «Последний забег» будет вчерашним. Изменение start_date DAG вообще не помогло.
Я установил часовой пояс по умолчанию для воздушного потока как местный часовой пояс, а также пользовательский интерфейс.
Сегодня 14 марта 2024 г., и я установил дату с датой начала 12 марта 2024 г. Запуск запланирован на 20:20 каждый день.
Код: Выделить всё
with DAG(
default_args=default_args,
dag_id="test_dag2",
description="dag with py operator",
start_date=datetime(2024, 3, 12, tzinfo=local_tz),
schedule_interval="20 20 * * *"
) as dag

Second, unpaused the dag and it ran for the previous days. The "Next Run" however, is 2024-03-13, which I expected to see 2024-03-14.

And then, at 2024-03-14 20:20, the dag ran and the status was updated in UI, showing "Last Run" as yesterday 2024-03-13, and "Next Run" will be today 2024-03-14.

Checked DagRun still showed the same: it was scheduled to be run on 2024-03-13, but we can see it was queued at 2024-03-14 (converted UTC to local time in red, though they showed the same date).

And then I made a manual run, in which "Last Run" was showing the correct date - 2024-03-14. So manual run always shows the correct date and time, while scheduled run is always a date late.

Why "Last Run" and "Next Run" do not show the correct date? Why are they always one day behind the actual run date (both UTC and local date)?
Источник: https://stackoverflow.com/questions/781 ... e-and-time