Skip to content

Commit

Permalink
UTC Date
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Nov 19, 2024
1 parent 77e1873 commit f67fbcd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/invoice/src/templates/html/components/meta.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TZDate } from "@date-fns/tz";
import { UTCDate } from "@date-fns/utc";
import { format } from "date-fns";
import type { Template } from "../../types";

Expand Down Expand Up @@ -43,7 +44,7 @@ export function Meta({
</span>
<span className="text-[11px] font-mono flex-shrink-0">
{format(
new TZDate(issueDate, timezone),
new TZDate(new UTCDate(issueDate), timezone),
template.date_format,
)}
</span>
Expand All @@ -59,7 +60,10 @@ export function Meta({
{template.due_date_label}:
</span>
<span className="text-[11px] font-mono flex-shrink-0">
{format(new TZDate(dueDate, timezone), template.date_format)}
{format(
new TZDate(new UTCDate(dueDate), timezone),
template.date_format,
)}
</span>
</div>
</div>
Expand Down

0 comments on commit f67fbcd

Please sign in to comment.