Skip to content

Conversation

@dasosann
Copy link
Contributor

요약

fix: 촬영 시각은 받은 시간 그대로 변환

구현 사항

  • [ ]
  • [ ]
  • [ ]
  • [ ]

📸 스크린샷

Need Review

  • ~ 부분 이렇게 구현했어요, 피드백 부탁해요!

Reference

📜 리뷰 규칙

Reviewer는 아래 P5 Rule을 참고하여 리뷰를 진행합니다.
P5 Rule을 통해 Reviewer는 Reviewee에게 리뷰의 의도를 보다 정확히 전달할 수 있습니다.

  • P1: 꼭 반영해주세요 (Comment)
  • P2: 적극적으로 고려해주세요 (Comment)
  • P3: 웬만하면 반영해 주세요 (Comment)
  • P4: 반영해도 좋고 넘어가도 좋습니다 (Approve)
  • P5: 그냥 사소한 의견입니다 (Approve)

@vercel
Copy link

vercel bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
fe Ready Ready Preview Comment Nov 28, 2025 3:53pm

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dasosann, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사진 상세 화면에서 촬영 시각이 잘못 변환되어 표시되던 문제를 해결합니다. 기존에는 촬영 시각도 업로드 시각과 동일하게 로컬 시간대(KST)로 변환되어 표시되었으나, 이제는 사진의 EXIF 데이터에 기록된 원본 촬영 시각을 시간대 변환 없이 그대로 사용자에게 보여주도록 수정되었습니다. 이를 통해 사진의 실제 촬영 시각 정보의 정확성이 보장됩니다.

Highlights

  • 촬영 시각 처리 방식 개선: 사진의 촬영 시각을 표시할 때, 기존에는 UTC를 로컬 시간(KST)으로 변환하는 함수를 사용했으나, 이제는 받은 ISO 문자열을 시간대 변환 없이 그대로 파싱하여 표시하도록 변경되었습니다.
  • 새로운 유틸리티 함수 추가: 촬영 시각을 정확히 표시하기 위해 formatCaptureTime이라는 새로운 함수가 SectionPhotoData.tsx 파일에 추가되었습니다. 이 함수는 ISO 문자열에서 연, 월, 일, 시, 분 정보를 직접 추출합니다.
  • 코드 가독성 향상: 기존의 formatKoreanDateTime 함수와 새로 추가된 formatCaptureTime 함수에 각각 '업로드 시각: UTC를 로컬 시간(KST)으로 변환' 및 '촬영 시각: 사진 EXIF 시간 그대로 표시 (타임존 변환 안 함)' 주석이 추가되어 각 함수의 목적이 명확해졌습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

안녕하세요. PR 잘 보았습니다. 촬영 시각을 타임존 변환 없이 그대로 표시하도록 수정한 부분이 인상 깊습니다. formatCaptureTime 함수를 새로 만들어 로직을 분리한 점이 좋네요. 다만, 해당 함수의 안정성을 높이기 위한 몇 가지 제안 사항을 리뷰 코멘트로 남겼습니다. 확인 부탁드립니다.

Comment on lines 14 to 24
const formatCaptureTime = (isoString?: string): string => {
if (!isoString) return '';

// ISO 문자열에서 직접 파싱 (타임존 변환 없이)
const match = isoString.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/);
if (!match) return '정보 없음';

const [, year, month, day, hour, minute] = match;

return `${year}${month}${day}${hour}${minute}분`;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

안녕하세요! formatCaptureTime 함수 구현 잘 보았습니다.

현재 정규식은 YYYY-MM-DDTHH:mm:ss 형식을 기대하고 있어, 초(second) 정보가 없거나 날짜만 있는 ISO 문자열(YYYY-MM-DD)이 들어올 경우 의도치 않게 '정보 없음'을 반환할 수 있습니다.

조금 더 유연하게 다양한 ISO 날짜 형식에 대응할 수 있도록 아래와 같이 개선하는 것을 제안합니다. 이 코드는 시간 정보가 없는 경우 날짜만 표시하고, 초 정보는 무시하여 더 안정적으로 동작합니다.

const formatCaptureTime = (isoString?: string): string => {
  if (!isoString) return '';

  // ISO 문자열에서 직접 파싱 (타임존 변환 없이)
  // YYYY-MM-DD 또는 YYYY-MM-DDTHH:mm... 형식을 지원합니다.
  const match = isoString.match(/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2}))?/);
  if (!match) return '정보 없음';

  const [, year, month, day, hour, minute] = match;

  if (hour !== undefined && minute !== undefined) {
    return `${year}년 ${month}월 ${day}일 ${hour}시 ${minute}분`;
  }

  return `${year}년 ${month}월 ${day}일`;
};

@dasosann dasosann merged commit 20f12ae into main Nov 28, 2025
4 checks passed
@dasosann dasosann deleted the fix/upload-time branch November 28, 2025 17:39
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