feat: optimize timezone of server (#1537)

This commit is contained in:
takatost 2023-11-15 19:14:31 +08:00 committed by GitHub
parent 8306b4373b
commit 8f2bd7663d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ if not os.environ.get("DEBUG") or os.environ.get("DEBUG").lower() != 'true':
import grpc.experimental.gevent import grpc.experimental.gevent
grpc.experimental.gevent.init_gevent() grpc.experimental.gevent.init_gevent()
import time
import logging import logging
import json import json
import threading import threading
@ -36,6 +37,9 @@ from libs.passport import PassportService
import warnings import warnings
warnings.simplefilter("ignore", ResourceWarning) warnings.simplefilter("ignore", ResourceWarning)
os.environ['TZ'] = 'UTC'
time.tzset()
class DifyApp(Flask): class DifyApp(Flask):
pass pass