-
Notifications
You must be signed in to change notification settings - Fork 1
fix: 촬영 시각은 받은 시간 그대로 변환 #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 함수를 새로 만들어 로직을 분리한 점이 좋네요. 다만, 해당 함수의 안정성을 높이기 위한 몇 가지 제안 사항을 리뷰 코멘트로 남겼습니다. 확인 부탁드립니다.
| 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}분`; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요! 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}일`;
};
요약
fix: 촬영 시각은 받은 시간 그대로 변환
구현 사항
📸 스크린샷
Need Review
Reference
📜 리뷰 규칙
Reviewer는 아래 P5 Rule을 참고하여 리뷰를 진행합니다.
P5 Rule을 통해 Reviewer는 Reviewee에게 리뷰의 의도를 보다 정확히 전달할 수 있습니다.