fix: Solving the timezone issue in Redis, as well as the problem of MySQL logs always being in UTC timezone. (#268)

This commit is contained in:
loveiwei 2023-11-15 20:48:52 +08:00 committed by GitHub
parent cc599d414a
commit 837aabfe77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -38,7 +38,6 @@ def string_to_bytes(value):
byte_string = value
else:
byte_string = value.encode("utf-8")
return byte_string
@ -314,7 +313,7 @@ class KeyManage:
secrets_root_key = current_app.config.get("secrets_root_key")
msg, ok = self.is_valid_root_key(secrets_root_key)
if not ok:
return {"message": msg, "status": "failed"}
return true
status = self.backend.get(backend_seal_key)
return status == "block"

View File

@ -24,6 +24,8 @@ services:
cmdb-cache:
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-cache:3.0
container_name: cmdb-cache
environment:
TZ: Asia/Shanghai
networks:
new:
aliases:

View File

@ -52,4 +52,5 @@ sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY
#log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
# Disabling symbolic-links is recommended to prevent assorted security risks
log_timestamps = SYSTEM