Skip to content

Commit

Permalink
fix(deps): fix breaking change date-fn-tz
Browse files Browse the repository at this point in the history
  • Loading branch information
belanglos committed Jun 5, 2024
1 parent c85365a commit 10bda3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/util/dates.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { utcToZonedTime, format } = require('date-fns-tz')
const { toZonedTime, format } = require('date-fns-tz')
const { sv, en } = require('date-fns/locale')
const { INFORM_IF_IMPORTANT_INFO_IS_MISSING } = require('./constants')

Expand All @@ -25,7 +25,7 @@ function formatVersionDate(language = 'sv', date) {
const unixTime = Date.parse(date)
if (unixTime) {
const timeZone = 'Europe/Berlin'
const zonedDate = utcToZonedTime(new Date(unixTime), timeZone)
const zonedDate = toZonedTime(new Date(unixTime), timeZone)
return format(zonedDate, 'Ppp', { locale: locales[language] })
}
return null
Expand Down

0 comments on commit 10bda3b

Please sign in to comment.