Skip to content

Commit

Permalink
fix: fix timezone support of the date provider (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoaidHathot authored Aug 26, 2024
1 parent d89126c commit 724c3f5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ export async function createDateProvider(
}

function toFormat(now: number, format: string) {
const dateTime = DateTime.fromMillis(now);
let dateTime = DateTime.fromMillis(now);

if (config.timezone) {
dateTime.setZone(config.timezone);
dateTime = dateTime.setZone(config.timezone);
}

return dateTime.toFormat(format, { locale: config.locale });
Expand Down

0 comments on commit 724c3f5

Please sign in to comment.