Skip to content

[DONE] 저널 날짜가 어디서 빌드하든 글을 쓴 서울 날짜로 찍힌다 - #307

Merged
patternflow-bot merged 4 commits into
devfrom
claude/pf-round134-journal-l9pux6
Oct 27, 2026
Merged

patternflow-bot merged 4 commits into
devfrom
claude/pf-round134-journal-l9pux6

Conversation

@patternflow-bot

@patternflow-bot patternflow-bot commented Oct 27, 2026 •

Copy link
Copy Markdown

dev / https://claude.ai/code/session_01Gdqi6QgDMDMN98AKkhopZd

저널 날짜가 빌드한 기계의 시간대를 따라서, UTC 빌드에선 서울 새벽 0시와 9시 사이에 쓴 글 넷(머리아파, 멈췄다, 잘 되면 좋겠다, 부정적)이 하루 앞당겨져 찍혔어요. /journal 전체에서 520곳 가운데 60곳이었어요. 머지하면 어디서 빌드하든 머리말에 쓴 서울 날짜가 찍혀요.

좋아지는 것: 저널 날짜가 글을 쓴 서울 날짜로 찍힌다 — 새벽 글이 전날로 보이지 않는다

체크리스트

한 일

  • web/src/lib/journal.ts 의 formatJournalDate 에 timeZone: "Asia/Seoul" 을 더했어요. 이 함수는 저널 목록, 글 쪽 머리, 글 쪽 아래 목록에서만 불려요. 글 차례와 번호는 Date.parse 로 정해서 그대로예요.
  • 새 web/src/lib/journal.test.ts 가 vi.stubEnv("TZ", …) 로 프로세스 시간대를 UTC, 로스앤젤레스, 키리티마티(UTC+14), 서울로 바꿔 가며 날짜를 찍어 봐요. 저널 74개 파일 모두 머리말에 쓴 날과 찍힌 날이 같은지도 봐요.

증거

이 컨테이너는 UTC 예요(date → Tue Oct 27 14:41:48 UTC 2026). 빌드한 쪽을 next start 로 띄우고 목록 두 쪽, 글 74쪽의 날짜를 다 읽어 머리말의 서울 날짜와 견줬어요. 히어로 2곳, 목록 줄 74곳, 글 머리 74곳, 글 아래 목록 370곳이에요.

dev        dates read: 520 · off from the Seoul date: 60
이 브랜치  dates read: 520 · off from the Seoul date: 0

dev 에서 틀린 60곳은 글 넷이 나오는 자리 모두예요. 예를 들면 /journal/headache dateline · shown 2026년 5월 13일 · Seoul 2026년 5월 14일, /journal/en row · negative · shown August 26, 2026 · Seoul August 27, 2026 이에요.

글 목록과 차례는 전후가 같아요. dev 의 journal.ts 와 이 브랜치의 것으로 getAllJournalPosts 를 돌려 견줬어요.

ko posts 37 same order: true
en posts 37 same order: true

새 시험을 dev 의 journal.ts 에 돌리면

× prints the Seoul day when the process runs in UTC
  → expected '2026년 5월 13일' to be '2026년 5월 14일'
× prints the Seoul day when the process runs in America/Los_Angeles
  → expected '2026년 5월 13일' to be '2026년 5월 14일'
× prints the Seoul day when the process runs in Pacific/Kiritimati
  → expected '2026년 10월 5일' to be '2026년 10월 4일'
✓ prints the Seoul day when the process runs in Asia/Seoul
× gives every post the day written in its frontmatter
  → expected [ …(8) ] to deeply equal []
Tests  4 failed | 1 passed (5)

고친 뒤엔 Tests 5 passed (5) 예요.

다섯 검사(web/ 에서):

npm ci                              → exit 0
npm run lint -- --max-warnings=0    → exit 0
npm run typecheck                   → exit 0 (tsc 둘 다)
npm run build                       → exit 0 (dev 판도, 이 브랜치 판도 처음 한 번에)
npm run check:ci                    → exit 0 · Test Files 130 passed (130) · Tests 1594 passed (1594)
                                      drift 14 passed, links-absolute · roadmap skipped (태그 없음 · gh 로그인 없음)
npm run check:voice                 → check:voice: nothing found
npm run check:voice -- -            → (PR 본문) check:voice: nothing found

PR 의 검사(head d29335e): Drift checks | completed | success, Web CI | completed | success.

전후 사진은 「머리아파」 글 쪽의 머리와 /journal 목록이에요. 바뀐 건 날짜 글자뿐이에요.

폰 390 · 머리아파 · 후

폰 390 · 머리아파 · 전(dev)

데스크톱 1440 · 머리아파 · 후

데스크톱 1440 · 머리아파 · 전(dev)

폰 390 · 저널 목록 · 후

폰 390 · 저널 목록 · 전(dev)

실행법

cd web
npx vitest run src/lib/journal.test.ts
TZ=UTC npm run build && npx next start -p 3100
# /journal/headache 머리의 날짜가 2026년 5월 14일, /journal/stopped 가 5월 23일

가정

  • 「창작자가 열어야 하는 것」의 저널 날짜 시간대 줄을 골랐어요. 작업 글이 저널 정리 10바퀴에 이 줄을 이미 잰 감으로 열었어요. 고친 파일은 web/src/lib/journal.ts 하나와 새 시험이고, 바뀌는 건 저널에 찍히는 날짜 글자뿐이에요. 133바퀴가 「다음 바퀴」 1번으로 둔 감이기도 해요.
  • 서울로 정한 건 74개 파일의 날짜가 모두 +09:00 이어서예요. 로드맵의 todaySeoul(app/roadmap/roadmap-data.ts:39)도 같은 까닭으로 Asia/Seoul 을 써요. 나중에 다른 시간대로 쓴 글이 생기면 그 글은 서울 날짜로 찍혀요. 모든 글 시험은 +09:00 인 글만 봐요.
  • RSS(app/feed.xml/route.ts:32)와 사이트맵(app/sitemap.ts:58)은 날짜를 글자로 찍지 않고 시각 그대로 넘겨서 원래 맞았어요. 건드리지 않았어요.
  • 운영 서버의 시간대는 이 컨테이너에서 볼 수 없어요. 서울 시간대로 빌드하면 dev 에서도 맞게 나오고, UTC 로 빌드하면(이 컨테이너, GitHub Actions) 틀려요. 고친 뒤엔 어디서든 같아요.
  • 표 밖: 글 쪽 OG 그림(app/journal/[slug]/opengraph-image.tsx:54)은 날짜를 머리말 글 그대로(2026-05-14T01:30:00+09:00) 찍어요. 「다음 바퀴」 3번에 뒀어요.

Changelog

Web

  • Journal dates are the Seoul day a post was written, wherever the site is built. The formatter used the build machine's time zone, so a UTC build printed the four posts written between midnight and 9 a.m. in Seoul a day early, 60 of the 520 dates across /journal.

경험

언제: 날짜나 시각을 찍는 코드를 여러 시간대에서 시험할 때
교훈: vi.stubEnv("TZ", zone) 로 바꾸면 Node 가 그 자리에서 시간대를 다시 읽어 새 Intl.DateTimeFormat 도 따라가니, 프로세스를 따로 띄우지 말고 시험 파일 하나에서 it.each 로 여러 시간대를 돌려요
근거: #307 에서 dev 의 formatJournalDate 가 같은 vitest 파일 안에서 UTC · 로스앤젤레스 · 키리티마티는 빨갛고 서울만 초록이었어요

바퀴

바퀴 134 · 후보: 저널 — 고친 곳: web/src/lib/journal.ts(formatJournalDate) · 까닭: UTC 빌드에서 저널 날짜 520곳 가운데 60곳이 서울 새벽에 쓴 글 넷을 하루 앞당겨 찍었다

다음 바퀴

  • 흐린 글자 대비: 언어 전환의 꺼진 쪽(.journal-lang-switch, #A69F90)이 목록의 흰 바탕에서 2.63:1, 글 쪽 크림에서 2.29:1 이고, 목록의 「Archive」(.journal-archive-label)도 2.63:1 이에요. 위 사진에서도 「EN」 이 거의 안 보여요. 토큰은 두고 저널 규칙에서 있는 --ink-muted(#6B655A)로요.
  • 글 쪽에 <main> 이 없다: ArticleLayout.tsx 가 <article> 과 <footer> 를 바로 그려요. 목록 쪽은 <main className="journal-index"> 예요. 133바퀴가 axe 로 글 74쪽 모두에서 landmark-one-main 을 봤어요.
  • 글 쪽 OG 그림의 날짜: app/journal/[slug]/opengraph-image.tsx:54 가 post.date 를 그대로 찍어서 공유 카드에 2026-05-14T01:30:00+09:00 이 대문자로 나와요. 이번에 서울로 맞춘 formatJournalDate 를 읽으면 돼요.
  • incoming/ROUND.md 「창작자가 열어야 하는 것」의 「저널 날짜가 서버 시간대와 상관없이 글을 쓴 서울 날짜로 찍힌다」 줄은 이 PR 로 끝났어요. 143바퀴의 후보 채우기에서 빼요.

https://claude.ai/code/session_01Gdqi6QgDMDMN98AKkhopZd


Generated by Claude Code

Four posts written between midnight and 9 a.m. in Seoul showed the day before on a UTC build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gdqi6QgDMDMN98AKkhopZd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gdqi6QgDMDMN98AKkhopZd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gdqi6QgDMDMN98AKkhopZd
@patternflow-bot patternflow-bot changed the title [WIP] 저널 화면 한 곳을 다듬는다 (134바퀴) [WIP] 저널 날짜가 어디서 빌드하든 글을 쓴 서울 날짜로 찍힌다 Oct 27, 2026
@patternflow-bot
patternflow-bot marked this pull request as ready for review October 27, 2026 14:57
@patternflow-bot patternflow-bot changed the title [WIP] 저널 날짜가 어디서 빌드하든 글을 쓴 서울 날짜로 찍힌다 [DONE] 저널 날짜가 어디서 빌드하든 글을 쓴 서울 날짜로 찍힌다 Oct 27, 2026
@patternflow-bot
patternflow-bot merged commit 04f3bcc into dev Oct 27, 2026
2 checks passed
@patternflow-bot
patternflow-bot deleted the claude/pf-round134-journal-l9pux6 branch October 27, 2026 15:00
engmung pushed a commit to engmung/Patternflow that referenced this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants