Skip to content

Commit

Permalink
Fix: [Server] time.tzset() 関数が存在しない環境を考慮
Browse files Browse the repository at this point in the history
サードパーティーライブラリ同梱の arm64 向け Python で再現した
  • Loading branch information
tsukumijima committed Sep 22, 2023
1 parent 5150a72 commit 3a6dd5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/KonomiTV.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
import time
if sys.platform != 'win32':
os.environ['TZ'] = 'Asia/Tokyo'
time.tzset()
# Linux でもなぜか time.tzset() が使えないことがあるので、try-except で囲む
try:
time.tzset()
except AttributeError:
pass

import atexit
import platform
Expand Down

0 comments on commit 3a6dd5a

Please sign in to comment.