vaishsriram opened a new pull request, #77224:
URL: https://github.com/apache/airflow/pull/77224

   `GET /api/v2/dags/{dag_id}/details` (and the Dag > Details page in the UI) 
reported `[core] default_timezone` for every Dag, even when the Dag has its own 
timezone, for example one derived from a timezone-aware `start_date`.
   
   `get_dag_details` copies attributes from the serialized Dag onto the 
`DagModel` only when the model does not already have them. `DagModel.timezone` 
was a read-only property returning `settings.TIMEZONE`, so the Dag's real 
timezone was never copied. Nothing in core, providers, the Task SDK or 
airflowctl reads that property, and scheduling uses the timetable's own 
timezone, so only this response was affected.
   
   This removes the property so the serialized Dag's timezone comes through. A 
Dag without a timezone-aware `start_date` still reports the configured default 
timezone, because the SDK resolves it from `[core] default_timezone` at parse 
time.
   
   Tests: added a regression test that fails without the change (returns `UTC` 
for a Dag with an `America/New_York` start date). Ran 
`TestDagDetails`/`TestGetDag*`, `ruff`, and the `mypy-airflow-core` hook.
   
   related: #49720
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (Claude Code, Sonnet 5)
   
   Generated-by: Claude Code (Sonnet 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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]

Reply via email to