Skip to content

Commit

Permalink
适配Python3.8+backports.zoneinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Sep 4, 2023
1 parent dcb139f commit e664f10
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
from hash import hash
import pathlib
from datetime import datetime
from zoneinfo import ZoneInfo

try:
from zoneinfo import ZoneInfo
except ImportError:
from backports.zoneinfo import ZoneInfo

data = {
"time": datetime.now(tz=ZoneInfo("Asia/Shanghai")).isoformat(),
Expand Down

0 comments on commit e664f10

Please sign in to comment.