배치 실계좌에서 종목조회로 변경

This commit is contained in:
2026-03-03 13:34:31 +09:00
parent 0531952edb
commit d6841a06f7
5 changed files with 163 additions and 76 deletions

View File

@@ -0,0 +1,18 @@
"""공통 로깅 설정 — KST(Asia/Seoul) 타임존 포매터 제공."""
import logging
import datetime
import pytz
KST = pytz.timezone("Asia/Seoul")
class KSTFormatter(logging.Formatter):
"""%(asctime)s 를 KST(UTC+9) 기준으로 출력하는 포매터."""
def formatTime(self, record: logging.LogRecord, datefmt: str | None = None) -> str:
ct = datetime.datetime.fromtimestamp(record.created, tz=KST)
if datefmt:
return ct.strftime(datefmt)
t = ct.strftime(self.default_time_format)
return self.default_msec_format % (t, record.msecs)