Skip to content

Commit

Permalink
fix: Use UTC for all dates since time isn't shown anyways
Browse files Browse the repository at this point in the history
  • Loading branch information
kiosion committed Nov 11, 2023
1 parent 928f133 commit e300422
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions svelte-app/src/lib/helpers/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const formatDate = (
lang: string = get(currentLang) || 'en'
) => {
const date = new Date(dateStr);
date.setHours(0 - date.getTimezoneOffset() / 60);
switch (format) {
case 'full':
return new Intl.DateTimeFormat(lang, {
Expand Down

0 comments on commit e300422

Please sign in to comment.