yuseok89 commented on code in PR #76400:
URL: https://github.com/apache/airflow/pull/76400#discussion_r4463821137
##########
providers/standard/src/airflow/providers/standard/operators/datetime.py:
##########
@@ -109,6 +109,12 @@ def target_times_as_dates(
if lower is None or upper is None:
return lower, upper
+ # Overnight window: lower time is later than upper time (e.g. 22:00-06:00).
+ # When ``base_date`` (now) is before the upper bound, the window started
the
+ # previous day; otherwise it ends the next day.
if upper < lower:
- upper += datetime.timedelta(days=1)
+ if base_date.time() < upper.time():
+ lower -= datetime.timedelta(days=1)
Review Comment:
With a `datetime` `target_lower` and a `time` `target_upper`, this moves the
given start back a day, so a run before it now takes the true branch, unlike on
main.
--
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]