fix: vessel_store 타임존 수정 + 모선 추론 이식 + 검토 목록 동기화 #221

병합
htlee bugfix/vessel-store-tz-naive 에서 develop 로 17 commits 를 머지했습니다 2026-04-04 10:28:41 +09:00
Showing only changes of commit b8b60bf314 - Show all commits

파일 보기

@ -1,8 +1,11 @@
import logging
from datetime import datetime, timezone
from typing import Optional
from zoneinfo import ZoneInfo
import numpy as np
_KST = ZoneInfo('Asia/Seoul')
import pandas as pd
logger = logging.getLogger(__name__)
@ -126,8 +129,9 @@ class VesselStore:
max_ts = pd.to_datetime(df_all['timestamp'].dropna()).max()
if hasattr(max_ts, 'to_pydatetime'):
max_ts = max_ts.to_pydatetime()
# timestamp는 UTC aware → KST wall-clock naive로 변환
if isinstance(max_ts, datetime) and max_ts.tzinfo is not None:
max_ts = max_ts.replace(tzinfo=None)
max_ts = max_ts.astimezone(_KST).replace(tzinfo=None)
self._last_bucket = max_ts
vessel_count = len(self._tracks)