feat(time): 프로젝트 전체 시간 KST(UTC+9) 통일

- app/timezone.py 신설: KST 고정오프셋(+9, DST 없음) + now_kst/today_kst/to_kst_iso
- DB 직렬화 created_at/updated_at/decided_at/uploaded_at 표시를 UTC→KST 로 변환
  (expense/cupang/vacation db.py)
- _now_iso(JSON 저장) KST 기준
- 라우터 date.today()/datetime.now() → today_kst()/now_kst() (달력 '오늘'/엑셀 파일명)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 08:48:28 +09:00
parent 32fc12e283
commit fa1027fa1b
9 changed files with 80 additions and 30 deletions
+7 -5
View File
@@ -20,6 +20,8 @@ from typing import Any
from psycopg.rows import dict_row
from psycopg_pool import ConnectionPool
from app.timezone import KST
from .store import STATUSES, compute_boxes
@@ -558,7 +560,7 @@ class CupangDBStore:
for k in ("created_at", "updated_at"):
v = out.get(k)
if isinstance(v, datetime):
out[k] = v.astimezone(timezone.utc).isoformat(timespec="seconds")
out[k] = v.astimezone(KST).isoformat(timespec="seconds")
return out
@staticmethod
@@ -572,7 +574,7 @@ class CupangDBStore:
for k in ("created_at", "updated_at"):
v = out.get(k)
if isinstance(v, datetime):
out[k] = v.astimezone(timezone.utc).isoformat(timespec="seconds")
out[k] = v.astimezone(KST).isoformat(timespec="seconds")
return out
@staticmethod
@@ -586,7 +588,7 @@ class CupangDBStore:
for k in ("created_at", "updated_at"):
v = out.get(k)
if isinstance(v, datetime):
out[k] = v.astimezone(timezone.utc).isoformat(timespec="seconds")
out[k] = v.astimezone(KST).isoformat(timespec="seconds")
return out
@staticmethod
@@ -603,7 +605,7 @@ class CupangDBStore:
for k in ("created_at", "updated_at"):
v = out.get(k)
if isinstance(v, datetime):
out[k] = v.astimezone(timezone.utc).isoformat(timespec="seconds")
out[k] = v.astimezone(KST).isoformat(timespec="seconds")
return out
@staticmethod
@@ -620,5 +622,5 @@ class CupangDBStore:
for k in ("created_at", "updated_at"):
v = out.get(k)
if isinstance(v, datetime):
out[k] = v.astimezone(timezone.utc).isoformat(timespec="seconds")
out[k] = v.astimezone(KST).isoformat(timespec="seconds")
return out