Skip to content

Commit

Permalink
fix: Unable to export complaint with N/A last updated date (#892)
Browse files Browse the repository at this point in the history
  • Loading branch information
afwilcox committed Jan 27, 2025
1 parent 6bbaec0 commit 92aa20c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/src/v1/complaint/complaint.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,10 @@ export class ComplaintService {
};

const _applyTimezone = (input: Date, tz: string, output: "date" | "time" | "datetime"): string => {
if (!input) {
return "N/A"; // No date, so just return a placeholder string for the report
}

const utcDate = toDate(input, { timeZone: "UTC" });
const zonedDate = toZonedTime(utcDate, tz);

Expand Down

0 comments on commit 92aa20c

Please sign in to comment.