arnoldmr01 commented on code in PR #58025:
URL: https://github.com/apache/airflow/pull/58025#discussion_r2515718673


##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -516,22 +517,22 @@ def set_state(self, state: DagRunState) -> None:
             raise ValueError(f"invalid DagRun state: {state}")
         if self._state != state:
             if state == DagRunState.QUEUED:
-                self.queued_at = timezone.utcnow()
+                self.queued_at = pendulum.now(tz="UTC")
                 self.start_date = None
                 self.end_date = None
             if state == DagRunState.RUNNING:
                 if self._state in State.finished_dr_states:
-                    self.start_date = timezone.utcnow()
+                    self.start_date = pendulum.now(tz="UTC")
                 else:
-                    self.start_date = self.start_date or timezone.utcnow()
+                    self.start_date = self.start_date or pendulum.now(tz="UTC")
                 self.end_date = None
             if self._state in State.unfinished_dr_states or self._state is 
None:
                 if state in State.finished_dr_states:
-                    self.end_date = timezone.utcnow()
+                    self.end_date = pendulum.now(tz="UTC")
             self._state = state
         else:
             if state == DagRunState.QUEUED:
-                self.queued_at = timezone.utcnow()

Review Comment:
   As we discussed below, if there is no need to change from timezone to 
pendulum, these modification is also unnecessary. I will remove theses changes.



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