我知道我可以将 a 转换datetime.datetime
为钟摆
from datetime import datetime,timezone
import pendulum
a = datetime(2021,6,1,tzinfo=timezone.utc)
b = pendulum.instance(a)
b.tzinfo.name # the presence of the attribute 'name' means it's a pendulum timezone
type(b.tzinfo) # pendulum.tz.timezone.FixedTimezone
但我有一个独立的datetime.tzinfo
,是否可以将其转换为pendulum.tz.timezone.*
a = timezone.utc # well, imagine that it can be any tzinfo
b = pendulum.xxxxx(a) # that gives tome pendum.tz.timezone class
有没有这样的方法?