uranusjr commented on a change in pull request #20508:
URL: https://github.com/apache/airflow/pull/20508#discussion_r779342952



##########
File path: tests/utils/test_dates.py
##########
@@ -29,8 +29,10 @@
 
 class TestDates(unittest.TestCase):
     def test_days_ago(self):
+        from airflow.settings import TIMEZONE
+
         today = pendulum.today()
-        today_midnight = 
pendulum.instance(datetime.fromordinal(today.date().toordinal()))
+        today_midnight = 
pendulum.instance(datetime.fromordinal(today.date().toordinal()), tz=TIMEZONE)

Review comment:
       I think this has different meanings in some edge case because 
`pendulum.today()` has some weird semantics if the local time is at a different 
date from UTC (e.g. at 2am in UTC+3, UTC is still on the previous day).




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