From cb47f7d18653eabcc6179c89cae8e8f78b9690af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=9C=A8=E8=A6=81?= Date: Tue, 1 Aug 2023 14:11:49 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9F=E8=A1=8CSQL=E3=81=AE=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=A0=E3=82=BE=E3=83=BC=E3=83=B3=E3=82=92JST?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=99=E3=82=8B=E3=83=A1=E3=82=BD?= =?UTF-8?q?=E3=83=83=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/batch/laundering/sales_results_laundering.py | 1 + ecs/jskult-batch-laundering/src/db/database.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ecs/jskult-batch-laundering/src/batch/laundering/sales_results_laundering.py b/ecs/jskult-batch-laundering/src/batch/laundering/sales_results_laundering.py index ac2c79f7..1b11fa91 100644 --- a/ecs/jskult-batch-laundering/src/batch/laundering/sales_results_laundering.py +++ b/ecs/jskult-batch-laundering/src/batch/laundering/sales_results_laundering.py @@ -12,6 +12,7 @@ def exec(): db = Database.get_instance() try: db.connect() + db.to_jst() logger.debug('処理開始') # 卸販売実績テーブル(洗替後)作成 _call_sales_lau_upsert(db) diff --git a/ecs/jskult-batch-laundering/src/db/database.py b/ecs/jskult-batch-laundering/src/db/database.py index 280a9d8b..02904db0 100644 --- a/ecs/jskult-batch-laundering/src/db/database.py +++ b/ecs/jskult-batch-laundering/src/db/database.py @@ -180,6 +180,9 @@ class Database: self.__connection.close() self.__connection = None + def to_jst(self): + self.execute('SET time_zone = "+9:00"') + def __execute_with_transaction(self, query: str, parameters: dict): # トランザクションを開始してクエリを実行する with self.__connection.begin():