Replies: 1 comment
-
Managed to set the timezone for the DAG by setting it's start_date with a timezone. As far as I understood, start_date is a pendulum object which defaults to UTC timezones. from pendulum import datetime, timezone
start_date = datetime(2024, 4, 7)
start_date = timezone("America/Sao_Paulo").convert(start_date)
dag = DAG(
"example",
default_args=default_args,
schedule="*/5 * * * 1-5",
start_date=start_date,
catchup=False,
) Then, every DAG run will be on the desired timezone. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've set timezone for airflow with variable:
I got result:
the dag defination:
problem 1:
why the
dag_run.execution_date
gives the UTC time with both timezone related variable setted;problem 2:
why didn't the second cmd work?
Beta Was this translation helpful? Give feedback.
All reactions