Skip to content

Commit

Permalink
fix list view date display
Browse files Browse the repository at this point in the history
  • Loading branch information
dylmye committed Jun 24, 2023
1 parent c89c590 commit 209a8ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/TripListItemCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface TripListItemCardProps {
trip: Trip;
}

const now = dayjs();
const now = dayjs().startOf("day").format();

/** Index item with a preview of the trip */
const TripListItemCard = ({ trip }: TripListItemCardProps) => (
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/dates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const formatDate = (
format === "short"
? `${withDayName ? "ddd " : ""}l`
: `${withDayName ? "dddd " : ""}LL`;
return dayjs.utc(date).format(formatCode);
return dayjs(date).utc(true).format(formatCode);
};

export const formatTime = (date: string | dayjs.Dayjs, compact = true) => {
Expand Down

0 comments on commit 209a8ad

Please sign in to comment.