修复货币数字错误和没有货币种类问题,修复UTC和本地时间混用,改用UTC
This commit is contained in:
@@ -89,7 +89,7 @@ def load_mysql_config() -> dict:
|
||||
|
||||
|
||||
def connect_mysql(cfg: dict):
|
||||
return pymysql.connect(
|
||||
conn = pymysql.connect(
|
||||
host=cfg["host"],
|
||||
port=cfg["port"],
|
||||
user=cfg["user"],
|
||||
@@ -98,6 +98,9 @@ def connect_mysql(cfg: dict):
|
||||
charset=cfg["charset"],
|
||||
autocommit=True,
|
||||
)
|
||||
with conn.cursor() as cur:
|
||||
cur.execute("SET time_zone = '+00:00'")
|
||||
return conn
|
||||
|
||||
|
||||
def init_tables(conn):
|
||||
|
||||
Reference in New Issue
Block a user