uranusjr commented on code in PR #34744:
URL: https://github.com/apache/airflow/pull/34744#discussion_r1345294095


##########
tests/models/test_dag.py:
##########
@@ -94,10 +95,17 @@
 from tests.test_utils.timetables import cron_timetable, delta_timetable
 
 TEST_DATE = datetime_tz(2015, 1, 2, 0, 0)
-
 repo_root = Path(__file__).parents[2]
 
 
+def convert_dt(tz: Timezone, dt, dst_rule):
+    """Converts a datetime in the current timezone"""
+    try:
+        return tz.convert(dt=dt, dst_rule=dst_rule)
+    except TypeError:  # Pendulum 3 Timezone doesn't have dst_rule
+        return tz.convert(dt=dt)

Review Comment:
   Hmm this is awkward. How does Pendulum 3 handle time being rolled back? 
(`fold` in Python timezone speak.) Simply dropping the argument seems wrong, 
although this is probably OK-ish for just tests.



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