Skip to content

Commit ca88f48

Browse files
authored
Merge pull request #116 from ReflectionsProjections/events-fixed-ct-date
Forced CT on events page dates
2 parents c24fac3 + b89bd8c commit ca88f48

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

shared/src/components/DayEvent.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import { Box, Flex, Grid, Icon, Text, Tooltip } from "@chakra-ui/react";
2-
import moment from "moment";
32
import { Event } from "../api/types";
43
import { circleColors } from "../assets/event-circle-colors";
54
import { eventIcons } from "../assets/event-icons";
65

6+
import dayjs from "dayjs";
7+
import timezone from "dayjs/plugin/timezone";
8+
import utc from "dayjs/plugin/utc";
9+
10+
dayjs.extend(utc);
11+
dayjs.extend(timezone);
12+
713
export type DayEventProps = {
814
number: number;
915
event: Event;
@@ -228,8 +234,8 @@ export default function DayEvent({
228234
isDashboard ? "nowrap" : { base: "normal", md: "nowrap" }
229235
}
230236
>
231-
{moment(event.startTime).format("h:mma")}{" "}
232-
{moment(event.endTime).format("h:mma")}
237+
{dayjs(event.startTime).tz("America/Chicago").format("h:mma")}{" "}
238+
{dayjs(event.endTime).tz("America/Chicago").format("h:mma")} CT
233239
</Text>
234240
</Flex>
235241
</Flex>

0 commit comments

Comments
 (0)