taltal-beep opened a new pull request, #74838: URL: https://github.com/apache/airflow/pull/74838
When `target_lower` / `target_upper` are `datetime.time` values, `BranchDateTimeOperator` combines them with the current **UTC** date and then localizes the result to the Dag's timezone. For a Dag east of UTC, early in the local morning the UTC date is still the previous day, so the window is built for yesterday and the false branch is taken. Example: Dag in `Asia/Seoul`, window 07:00–23:00, now 07:50 Seoul (22:50 UTC the day before). The window becomes 07:00–23:00 Seoul *yesterday*, so now is past the upper bound and the operator follows `follow_task_ids_if_false`. This combines the times with the current date in the Dag's timezone instead. UTC Dags and `datetime` targets are unaffected. Added a test with a Seoul Dag: the in-window case fails on `main` and passes with the change; two out-of-window cases make sure the window is not just shifted. related: #40151 (closed as stale; the follow-up comment there tested `datetime` bounds, which are not affected) --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code 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]
