Skip to content
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

[feat] DB 타임존을 한국 시간으로 변경 #149

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

seohyun-106
Copy link
Contributor

🌈 PR 요약 / Linked Issue

DB 타임스탬프에 UTC로 저장되던 것을 한국 시간으로 변경했습니다
close #128

📌 변경 사항

  • UTC 한국 시간으로 변경하는 convertTimezone 라이브러리 추가
  • User, Review DB 스키마의 created_at, updated_at 디폴트 값 변경

✅ PR check list

1. 제목 양식 준수 확인

[feat] PR title

2. 테스트 코드 작동 스크린샷

npm run mocha

✅ After merge check list

1. 릴리즈 노트 변경

릴리즈 노트 To Do에서 Done으로 옮기기

2. 브랜치 삭제

@seohyun-106 seohyun-106 added 🍀 feature 새로운 기능 추가 🔨 fix 오작동 코드 바로잡기 3️⃣ priority: low 우선순위 낮음 labels Oct 7, 2022
@seohyun-106 seohyun-106 self-assigned this Oct 7, 2022
@seohyun-106 seohyun-106 changed the title [feat] DB 타임존이 한국 시간으로 변경 [feat] DB 타임존을 한국 시간으로 변경 Oct 7, 2022
@@ -0,0 +1,7 @@
const KOREA_TIME_DIFFERENCE: number = 9 * 60 * 60 * 1000;
Copy link
Member

Choose a reason for hiding this comment

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

요즘 클린코드책으로 수업 듣는다더니 장난 없네요 ? 🧐🧐

const KOREA_TIME_DIFFERENCE: number = 9 * 60 * 60 * 1000;

export const convertTimeZone = (currentTime: number): Date => {
let newTime: number = currentTime + KOREA_TIME_DIFFERENCE;
Copy link
Member

Choose a reason for hiding this comment

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

let -> const

Copy link
Member

Choose a reason for hiding this comment

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

let's go? where?

Copy link
Member

@geeneve geeneve left a comment

Choose a reason for hiding this comment

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

so so

@@ -0,0 +1,7 @@
const KOREA_TIME_DIFFERENCE: number = 9 * 60 * 60 * 1000;
Copy link
Member

Choose a reason for hiding this comment

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

오오 코딩 표준 👍👍 주석으로 정확히 얼마 정도의 시간인지 달아주면 좋을 것 같아여
ex) 9h, 10m, 100s 등등


export const convertTimeZone = (currentTime: number): Date => {
let newTime: number = currentTime + KOREA_TIME_DIFFERENCE;
let newDate: Date = new Date(newTime);
Copy link
Member

Choose a reason for hiding this comment

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

const plz kk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3️⃣ priority: low 우선순위 낮음 🍀 feature 새로운 기능 추가 🔨 fix 오작동 코드 바로잡기
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] Wrong UTC Time zone
3 participants