vaishsriram commented on PR #77224:
URL: https://github.com/apache/airflow/pull/77224#issuecomment-7049827867

   > Tested on main at 
[8894f5b](https://github.com/apache/airflow/commit/8894f5be87f056f69f7d847ab0e3e394669635eb)
 on macOS.
   > 
   > The new test fails on main (`UTC`) and passes with this change. 
`test_dags.py` passes, and ruff and mypy pass on the changed files.
   > 
   > One case to look at: when the start date has a fixed UTC offset, not a 
named zone, the response now shows pendulum's repr:
   > 
   > `start_date` of the Dag    main    This PR
   > none       `UTC`   `UTC`
   > `Asia/Tokyo`       `UTC`   `Asia/Tokyo`
   > fixed offset `+05:00`      `UTC`   `FixedTimezone(18000, name="+05:00")`
   > A fixed offset is what you get from 
`datetime.timezone(timedelta(hours=5))`, `pendulum.parse("...+05:00")` or a 
string start date with an offset. `DAGDetailsResponse.get_timezone` returns 
`str(tz)`, and for a `FixedTimezone` that is the repr. Returning `tz.name` 
instead gives `+05:00` and keeps the named zones as they are. With that 
one-line change on top of this PR, `test_dags.py` (public and UI routes) still 
passes.
   
   Thanks for testing this. Confirmed: `str()` on a FixedTimezone gives its 
repr, which this PR newly exposes. `get_timezone` now returns `tz.name`, so a 
+05:00 start date reports +05:00 and named zones are unchanged. The regression 
test is parametrized with a named zone and a fixed offset.


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