Skip to content

Commit 080d0fa

Browse files
committed
fix UTC time change in front
1 parent 2e6bbdd commit 080d0fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: frontend/src/app/dashboard/stream/StreamEvent.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { StreamEvent } from '../../../lib/types';
88
import { attendStream } from '../../../lib/api/dashboard/stream';
99

1010
const formatTime = (time: Date) => {
11+
const offsetTime = new Date(time.getTime() - 3.5 * 60 * 60 * 1000);
12+
1113
const options: Intl.DateTimeFormatOptions = {
1214
year: 'numeric',
1315
month: 'short',
@@ -16,7 +18,7 @@ const formatTime = (time: Date) => {
1618
minute: 'numeric',
1719
hour12: true,
1820
};
19-
return time?.toLocaleString('en-US', options);
21+
return offsetTime.toLocaleString('en-US', options);
2022
};
2123

2224
export default function StreamEvent({

0 commit comments

Comments
 (0)