Skip to content

Commit 8781fb6

Browse files
Fix ical utc conversion (#1253)
1 parent 1a5c9f0 commit 8781fb6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

extensions/cli/ccfddl/convert_to_ical.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def get_timezone(tz_str: str) -> timezone:
1919
"""将时区字符串转换为datetime.timezone对象"""
2020
if tz_str == 'AoE':
2121
return timezone(timedelta(hours=-12))
22+
if tz_str == 'UTC':
23+
return timezone.utc
2224
match = re.match(r'UTC([+-])(\d{1,2})$', tz_str)
2325
if not match:
2426
raise ValueError(f"无效的时区格式: {tz_str}")

0 commit comments

Comments
 (0)