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


   > If we just convert the `start_date` to pendulum with 
`pendulum.instance(start_date)` it fail instead with a 
`pendulum.tz.zoneinfo.exceptions.InvalidTimezone: Invalid timezone "+00:00"`
   
   Where exactly is this raised? `pendulum.instance()` seems to work with 
`datetime.timezone` for me:
   
   ```pycon
   >>> import datetime, pendulum
   >>> 
pendulum.instance(datetime.datetime.now().replace(tzinfo=datetime.timezone.utc))
   DateTime(2021, 6, 23, 5, 54, 45, 240168, tzinfo=Timezone('+00:00'))
   >>> 
pendulum.instance(datetime.datetime.now().replace(tzinfo=datetime.timezone(datetime.timedelta(seconds=0))))
   DateTime(2021, 6, 23, 5, 55, 45, 900498, tzinfo=Timezone('+00:00'))
   ```
   
   I’m using pendulum 2.1.2 (as specified in the official constraints).


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