File "/home/pi/.local/lib/python3.7/site-packages/pytz/__init__.py", line 237, in localizeAttributeError: 'str' object has no attribute 'tzinfo'
[02/Jun/2020 10:43:44] &quo
datetime.datetime.fromtimestamp(0, "<DstTzInfo 'US/Pacific' PST-1 day, 16:00:00 STD>")TypeError: tzinfoargument must be None or of a tzinfo subclass, not type 'str'
什么是tzinfo?
我正在尝试将tzinfo获取的from tzlocal.getlocalzone()存储到sqlite3表中。 如何让sqlite接受tzinfo类型?.PARSE_DECLTYPES)
db.execute("CREATE TABLE IF NOT EXISTS history (time TIMESTAMP NOT NULL, timediff TZINFO