ecerulm commented on issue #16551:
URL: https://github.com/apache/airflow/issues/16551#issuecomment-866405944


   
   > Where exactly is this raised? `pendulum.instance()` seems to work with 
`datetime.timezone` for me:
   
   It will be raised later at `pendulum.timezone(self.time zone.name)`
   
   So the following will raise InvalidTimezone:
   ```
   
pendulum.timezone(pendulum.instance(datetime(2021,6,1,tzinfo=timezone.utc)).tzinfo.name)
   ```
   
   because the pendulum's instance timezone will be Timezone("+00:00") with 
`.name=="+00:00"` and that's not a valid timezone name according to 
`pendulum.timezone()`.
   
   So in essence `pendulum.timezone("+00:00")` raises the exception. 
   
   But anyway I just removed the usage of 
`pendulum.timezone(self.timezone.name)` in the PR.
   
   
   


-- 
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:
[email protected]


Reply via email to