Skip to content

Conversation

@xaexunxang
Copy link
Contributor

@xaexunxang xaexunxang commented Jul 11, 2025

발송/미발송 예약 메일 로컬 시간으로 포맷팅

image

Summary by CodeRabbit

  • Refactor
    • 날짜 포맷팅 함수 이름이 변경되고, 구현이 간소화되어 지역 시간 기준으로 포맷팅됩니다.
    • 이메일 발송 내역 카드에서 새로운 날짜 포맷팅 함수를 사용하도록 업데이트되었습니다.

@xaexunxang xaexunxang self-assigned this Jul 11, 2025
@xaexunxang xaexunxang added the 🛠️ BugFix 오류 해결 과정 기록 label Jul 11, 2025
@xaexunxang xaexunxang linked an issue Jul 11, 2025 that may be closed by this pull request
@coderabbitai
Copy link

coderabbitai bot commented Jul 11, 2025

"""

Walkthrough

날짜 포맷팅 함수의 이름이 formatUtcToKst에서 formatLst로 변경되었고, UTC에서 KST로의 시간 수동 변환 로직이 제거되어 단순히 입력 문자열로부터 Date 객체를 생성하는 방식으로 구현이 간소화되었습니다. 해당 함수의 사용처도 함께 변경되었습니다.

Changes

파일/경로 변경 요약
src/shared/lib/date.ts formatUtcToKst 함수명을 formatLst로 변경 및 KST 변환 로직 제거
src/widgets/dashboard/ui/email/... 날짜 포맷팅 함수 import 및 사용 부분을 formatLst로 변경

Possibly related issues

Poem

🐰
날짜 함수가 새 옷을 입었네,
KST 더하기는 이제 굿바이~
이름도 바꿔서 깔끔하게,
LST로 시간 맞추기 참 쉽지!
코드도 마음도 한결 가벼워,
토끼도 박수 짝짝짝!
🕒✨
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2bd4ced and 0931a95.

📒 Files selected for processing (1)
  • src/shared/lib/date.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/shared/lib/date.ts
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

Copy link
Member

@m3k0813 m3k0813 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gooood

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81f5bc7 and 2bd4ced.

📒 Files selected for processing (2)
  • src/shared/lib/date.ts (1 hunks)
  • src/widgets/dashboard/ui/email/SentMailCard.tsx (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/widgets/dashboard/ui/email/SentMailCard.tsx (1)
src/shared/lib/date.ts (1)
  • formatLst (47-57)
🔇 Additional comments (3)
src/shared/lib/date.ts (1)

47-48: 시간대 처리 로직 검증 필요: 브라우저 로컬 타임존 해석으로 변경되어 의도치 않은 시간 표시 가능

현재 formatLst 함수(src/shared/lib/date.ts)가 UTC → KST 수동 변환을 제거하고 new Date(utcString) 로 브라우저 로컬 타임존을 사용하도록 변경되었습니다.
그러나 예약일자(reservationDate)는 “2025-05-01T14:00:00” 형식(타임존 정보 없음)의 문자열로 정의되어 있어,
입력 문자열에 ‘Z’가 없거나 사용자가 KST가 아닌 환경에서 확인할 경우 예상과 다른 시간이 출력될 수 있습니다.

확인 대상 위치:

  • src/shared/lib/date.ts: formatLst(utcString: string) 구현부
  • src/widgets/dashboard/ui/email/SentMailCard.tsx: formatLst(mail.reservationDate) 호출부
  • src/features/dashboard/model/store/EmailStore.tsx: reservationDate: string 타입 정의
  • src/features/dashboard/model/email.ts: EmailRequest·EmailResponsereservationDate 필드

조치 제안:

  • API 응답에 타임존 정보(예: “Z”) 포함 여부 확인
  • 필요 시 formatLst 내부에서 명시적으로 UTC → KST 변환 적용하거나, 입력값에 타임존을 추가하도록 데이터 형식 통일
src/widgets/dashboard/ui/email/SentMailCard.tsx (2)

4-4: 함수명 변경에 따른 import 업데이트가 올바르게 적용되었습니다.

formatUtcToKst에서 formatLst로의 함수명 변경이 올바르게 반영되었습니다.


41-41: 함수 호출 업데이트가 올바르게 적용되었습니다.

함수명 변경에 따른 호출 부분이 올바르게 업데이트되었습니다. 함수 구현이 변경되어 시간 표시 방식이 달라질 수 있으므로, 실제 화면에서 예상한 로컬 시간이 올바르게 표시되는지 확인해보세요.

@github-actions
Copy link

@xaexunxang xaexunxang merged commit 9ed2f60 into develop Jul 11, 2025
2 checks passed
@xaexunxang xaexunxang deleted the fix/#242/reservation-mail-date-format branch July 11, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️ BugFix 오류 해결 과정 기록

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] 발송/미발송 예약 메일 시간 포멧 수정

3 participants