dstandish commented on a change in pull request #5332: [AIRFLOW-3391] Upgrade 
pendulum to latest major version.
URL: https://github.com/apache/airflow/pull/5332#discussion_r295596690
 
 

 ##########
 File path: airflow/utils/timezone.py
 ##########
 @@ -89,10 +89,11 @@ def convert_to_utc(value):
     if not value:
         return value
 
-    if not is_localized(value):
-        value = pendulum.instance(value, TIMEZONE)
-
-    return value.astimezone(utc)
+    return (
 
 Review comment:
   OK my suggested change to `convert_to_utc` only fixed issue locally on my 
py3.6 env.  when i pushed this change on my fork, the tests still failed 
....very weird ... i suspect possibly it could be the py3.5 issues referenced 
here: https://pendulum.eustace.io/docs/#timezones.
   
   i wonder if this change should be combined or replaced with a change to use 
pendulum everywhere, instead of the piecemeal status quo.  if datetimes were 
everywhere always pendulum, it would be a lot easier to manage this kind of 
upgrade, and easier to write 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to