Skip to content

Commit 2bd4ced

Browse files
committed
fix: 발송/미발송 예약 메일 Local Standard Time(Lst)로 수정
1 parent 81f5bc7 commit 2bd4ced

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/shared/lib/date.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ export const formatDateLocalString = (date: Date, time: string): string => {
4444
return `${year}-${month}-${day}T${hour}:${minute}:00`;
4545
};
4646

47-
export const formatUtcToKst = (utcString: string): string => {
48-
const utcDate = new Date(utcString);
49-
50-
const kstTimestamp = utcDate.getTime() + 9 * 60 * 60 * 1000;
51-
const kstDate = new Date(kstTimestamp);
47+
export const formatLst = (utcString: string): string => {
48+
const kstDate = new Date(utcString);
5249

5350
const year = kstDate.getFullYear();
5451
const month = (kstDate.getMonth() + 1).toString().padStart(2, '0');

src/widgets/dashboard/ui/email/SentMailCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import arrow from '../../../../../public/assets/dashboard/mail/Arrow.svg';
22
import { useState } from 'react';
33
import IconButton from '../../../../../design-system/ui/buttons/IconButton';
4-
import { formatUtcToKst } from '../../../../shared/lib/date';
4+
import { formatLst } from '../../../../shared/lib/date';
55
import TertiaryButton from '../../../../../design-system/ui/buttons/TertiaryButton';
66
import { useNavigate, useParams } from 'react-router-dom';
77
import { ReadEmailResponse } from '../../../../features/dashboard/model/email';
@@ -38,7 +38,7 @@ const SentMailCard = ({ mail, isPending = false, onClickDelete }: SentMailCardPr
3838
<p>{mail.title}</p>
3939
</div>
4040
<p className="text-sm text-placeholderText">
41-
{formatUtcToKst(mail.reservationDate)}
41+
{formatLst(mail.reservationDate)}
4242
</p>
4343
</div>
4444
<IconButton

0 commit comments

Comments
 (0)