schwartzpub opened a new issue, #29037:
URL: https://github.com/apache/airflow/issues/29037
### Apache Airflow version
2.5.0
### What happened
When using cron syntax for DAG schedule, the scheduler is not running DAGs
at the correct time for my timezone. For instance, a DAG that should run at
6:00am is running at 12:00am as though the scheduler believes the system time
is set for UTC.
- Changing `default_timezone` in airflow.cfg doesn't seem to affect runtime.
- Changing DAG schedule to use
`start_date=pendulum.datetime(2023,1,17,tz='Asia/Bishkek')` and then setting
the UI to UTC will show the correct time and run the DAG at the correct time
for America/Chicago
-
airflow.cfg
`default_timezone = America/Chicago`
Ubuntu 20.04LTS
```
user@host:~$ sudo timedatectl
Local time: Thu 2023-01-19 06:44:37 CST
Universal time: Thu 2023-01-19 12:44:37 UTC
RTC time: Thu 2023-01-19 12:44:36
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
```
dag.py
```
...
schedule="*/15 6-17 * * 1-5",
start_date=pendulum.datetime(2023,1,17,tz='America/Chicago'),
catchup=True,
...
```
When checking the DAG details in the UI, I see this which leads me to
believe something is converting my schedule to UTC when the DAG is imported:
`next_dagrun_data_interval = DataInterval(start=DateTime(2023, 1, 19, 6, 45,
0, tzinfo=Timezone('UTC')), end=DateTime(2023, 1, 19, 7, 0, 0,
tzinfo=Timezone('UTC')))`
### What you think should happen instead
The DAG should run every 15min between 6a-6p CST in respect to the system,
Airflow, and DAG timezone configuration.
### How to reproduce
_No response_
### Operating System
Ubuntu 20.04 LTS
### Versions of Apache Airflow Providers
apache-airflow-providers-celery==3.1.0
apache-airflow-providers-common-sql==1.3.2
apache-airflow-providers-ftp==3.3.0
apache-airflow-providers-http==4.1.0
apache-airflow-providers-imap==3.1.1
apache-airflow-providers-microsoft-mssql==3.3.2
apache-airflow-providers-sqlite==3.3.1
### Deployment
Other
### Deployment details
Manual install of apache-airflow using pip.
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]