nailo2c commented on code in PR #50744:
URL: https://github.com/apache/airflow/pull/50744#discussion_r2096210260
##########
providers/standard/src/airflow/providers/standard/sensors/date_time.py:
##########
@@ -99,6 +99,14 @@ def poke(self, context: Context) -> bool:
self.log.info("Checking if the time (%s) has come", self.target_time)
return timezone.utcnow() > timezone.parse(self.target_time)
+ def _moment(self) -> datetime.datetime:
+ import pendulum
+
+ if isinstance(self.target_time, (pendulum.DateTime,
datetime.datetime)):
+ return self.target_time
+
+ return timezone.parse(self.target_time)
Review Comment:
Sure, let me do it for you 😄
--
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]