From 8f2bd7663d7dd6e8966c66e500dfb29b3a8994cc Mon Sep 17 00:00:00 2001 From: takatost Date: Wed, 15 Nov 2023 19:14:31 +0800 Subject: [PATCH] feat: optimize timezone of server (#1537) --- api/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/app.py b/api/app.py index 0a4381320128e7..4b7c35e91a84d3 100644 --- a/api/app.py +++ b/api/app.py @@ -10,6 +10,7 @@ import grpc.experimental.gevent grpc.experimental.gevent.init_gevent() +import time import logging import json import threading @@ -36,6 +37,9 @@ import warnings warnings.simplefilter("ignore", ResourceWarning) +os.environ['TZ'] = 'UTC' +time.tzset() + class DifyApp(Flask): pass