freeipa / freeipa-healthcheck

Check the health of a freeIPA installation
GNU General Public License v3.0
50 stars 28 forks source link

module 'datetime' has no attribute 'UTC' #302

Closed rcritten closed 1 year ago

rcritten commented 1 year ago

Sister issue to https://pagure.io/freeipa/issue/9454

In commit e05903dc95be0182eac310f5a9d593d93fc43fa8 we stopped using utcnow() because it is deprecated and used datatime.UTC instead. This was introduced in python 3.11 so doesn't work with older releases.

Use datetime.timezone.utc instead which is more universal. datetime.UTC is an alias to datetime.timezone.utc.