From 233389758642afb2c4a8c9272dbc2ed8409b7e39 Mon Sep 17 00:00:00 2001 From: goblurry Date: Sun, 16 Nov 2025 22:09:04 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20source=5Fpublished=5Fat=20=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=EB=A7=8C=20=EC=A0=80=EC=9E=A5=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95=20(timezone=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/news/news_db_repository.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/app/services/news/news_db_repository.py b/app/services/news/news_db_repository.py index a5b68b4..a08da34 100644 --- a/app/services/news/news_db_repository.py +++ b/app/services/news/news_db_repository.py @@ -34,16 +34,28 @@ async def save_column(self, column_data: Dict[str, Any]) -> bool: "sections": sections }, ensure_ascii=False) - # source_published_at을 TIMESTAMP로 변환 (문자열인 경우) + # source_published_at을 날짜만 추출 (YYYY-MM-DD 형식) published_at_timestamp = None if source_published_at: try: - # ISO 형식 문자열을 파싱 + # ISO 형식 문자열에서 날짜 부분만 추출 (YYYY-MM-DD) if isinstance(source_published_at, str): - published_at_timestamp = datetime.fromisoformat(source_published_at.replace('Z', '+00:00')) + # "2025-11-14T19:16:24Z" -> "2025-11-14" + date_str = source_published_at.split('T')[0] + # 날짜만 파싱하여 시간은 00:00:00으로 설정 + published_at_timestamp = datetime.strptime(date_str, '%Y-%m-%d') else: - published_at_timestamp = source_published_at - except Exception: + # datetime 객체인 경우 날짜만 추출 + if isinstance(source_published_at, datetime): + published_at_timestamp = datetime( + source_published_at.year, + source_published_at.month, + source_published_at.day + ) + else: + published_at_timestamp = None + except Exception as e: + logger.warning("source_published_at_parse_failed", error=str(e), value=source_published_at) published_at_timestamp = None # UPSERT 쿼리 (INSERT ... ON CONFLICT DO UPDATE) From 91948918c5ce2fd8615f5def2bfe8dbc93ebec6f Mon Sep 17 00:00:00 2001 From: goblurry Date: Sun, 16 Nov 2025 22:10:46 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=EB=B2=84=EC=A0=84=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8=201.2.4=20->=201.2.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config.py b/app/config.py index 264791c..bc6acdd 100644 --- a/app/config.py +++ b/app/config.py @@ -41,7 +41,7 @@ class Settings(BaseSettings): # 애플리케이션 버전 # deploy브랜치로 병합할 때 - app_version: str = "1.2.4" + app_version: str = "1.2.5" @property def allowed_origins_list(self) -> list[str]: