Skip to content

Commit

Permalink
Frontend - fix wrong locale for date parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Jan 4, 2024
1 parent 15656b8 commit 7e19c23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "Release"

on:
# push:
# branches: [ "main" ]
push:
branches: [ "main" ]
release:
types: [ published ]

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/dates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function toLocalISOString(date: DateTypes = new Date()): string | undefined {
return
}
const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
const userTime = new Date(date.toLocaleString(frLocale.code, {timeZone: userTimeZone}));
const userTime = new Date(date.toLocaleString('en-US', {timeZone: userTimeZone}));

// Convert user's local time to UTC
const utcTime = new Date(userTime.getTime() - userTime.getTimezoneOffset() * 60000);
Expand Down

0 comments on commit 7e19c23

Please sign in to comment.