Skip to content

Commit 9b12590

Browse files
committed
[feat] Update date formatting in Event components to use UTC
1 parent d2d76cb commit 9b12590

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Components/Event/EventCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ export function EventCard({ Event }: { Event: Models.IEvent }) {
7171
</label>
7272

7373
<label className="text-xl font-medium text-slate-700">
74-
{dayjs(Event.Start).format("YYYY-MM-DD HH:mm [UTC]")}
74+
{dayjs(Event.Start).utc().format("YYYY-MM-DD HH:mm [UTC]")}
7575
</label>
7676

7777
<label className="text-xl font-medium text-slate-700">
78-
{Event.End ? dayjs(Event.End).format("YYYY-MM-DD HH:mm [UTC]") : "Still Ongoing"}
78+
{Event.End ? dayjs(Event.End).utc().format("YYYY-MM-DD HH:mm [UTC]") : "Still Ongoing"}
7979
</label>
8080
</div>
8181
</div>

src/Components/Event/EventLog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function EventLog({ Event }: { Event: Models.IEvent }) {
4141
<label className="font-medium">{history.Status}</label>
4242

4343
<label>
44-
{dayjs(history.Created).format("YYYY-MM-DD HH:mm [UTC]")}
44+
{dayjs(history.Created).utc().format("YYYY-MM-DD HH:mm [UTC]")}
4545
</label>
4646
</td>
4747

src/Components/History/EventItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export function EventItem({ Prev, Curr }: IEventItem) {
124124
{dayjs(Curr.Start).format("DD MMM, HH:mm")}
125125

126126
{Curr.End && (
127-
<> - {dayjs(Curr.End).format("DD MMM, HH:mm [UTC]")}</>
127+
<> - {dayjs(Curr.End).utc().format("DD MMM, HH:mm [UTC]")}</>
128128
)}
129129
</label>
130130

src/Components/Home/EventGrid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ export function EventGrid() {
112112
return [
113113
x.Id,
114114
[tag],
115-
dayjs(x.Start).format("YYYY-MM-DD HH:mm [UTC]"),
115+
dayjs(x.Start).utc().format("YYYY-MM-DD HH:mm [UTC]"),
116116
x.End
117-
? dayjs(x.End).format("MM-DD HH:mm")
117+
? dayjs(x.End).utc().format("MM-DD HH:mm")
118118
: x.Status,
119119
x.Regions.length > 1
120120
? `${x.Regions[0]} +${x.Regions.length - 1}`

0 commit comments

Comments
 (0)