<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>연습 통계 on 얼쑤 · Team Edo</title><link>https://team-edo.github.io/tags/%EC%97%B0%EC%8A%B5-%ED%86%B5%EA%B3%84/</link><description>Recent content in 연습 통계 on 얼쑤 · Team Edo</description><generator>Hugo</generator><language>ko-kr</language><lastBuildDate>Wed, 28 Oct 2026 00:00:00 +0900</lastBuildDate><atom:link href="https://team-edo.github.io/tags/%EC%97%B0%EC%8A%B5-%ED%86%B5%EA%B3%84/index.xml" rel="self" type="application/rss+xml"/><item><title>한국 시간으로 집계하고 UTC 인덱스 쓰기</title><link>https://team-edo.github.io/posts/2026/10/kst-practice-aggregation-utc-index/</link><pubDate>Wed, 28 Oct 2026 00:00:00 +0900</pubDate><guid>https://team-edo.github.io/posts/2026/10/kst-practice-aggregation-utc-index/</guid><description>&lt;p>얼쑤의 성장 화면은 한국 시간으로 하루의 연습 시간을 보여줍니다. DB에는 연습 구간이 시작된 시각을 UTC로 저장합니다. 한국 시간 월요일 자정은 DB에서 일요일 15시이므로, 저장된 날짜를 그대로 묶으면 월요일에 연습한 기록이 지난주에 들어갑니다. 하루를 한국 시간으로 나누면서도, 조회할 회원과 기간은 인덱스로 좁힐 수 있게 쿼리를 구성했습니다.&lt;/p>
&lt;h2 id="조회-조건에는-utc-경계값을-넘겼다">UTC 경계값으로 범위 조회&lt;/h2>
&lt;p>서버는 사용자가 요청한 첫날의 한국 시간 자정과 마지막 날 다음 날의 자정을 각각 UTC로 바꿉니다. 예를 들어 10월 26일 하루를 조회하면 &lt;strong>10월 25일 15:00 UTC 이상, 10월 26일 15:00 UTC 미만&lt;/strong>이 범위입니다. 마지막 시각을 다음 날 시작 미만으로 두면, 마지막 초에 들어 있는 마이크로초도 포함됩니다.&lt;/p></description></item></channel></rss>