Skip to content

Commit

Permalink
Merge pull request #423 from ITPNYU/hotfix/timezone
Browse files Browse the repository at this point in the history
Support for the Timestamp type in firebase.
  • Loading branch information
rlho authored Sep 25, 2024
2 parents 33a057d + 0b56f3f commit f6b6d86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions booking-app/components/src/client/utils/serverDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const serverFormatDate = (
): string => {
if (!input) return "";
try {
const date = new Date(input);

const timestamp = parseTimestamp(input);
const date = new Date(timestamp.toDate());
const zonedDate = toZonedTime(date, timeZone);

const formattedResult = format(zonedDate, "yyyy-MM-dd hh:mm a", {
Expand Down

0 comments on commit f6b6d86

Please sign in to comment.