Skip to content

Commit

Permalink
Timezone fix for fbt opens at date
Browse files Browse the repository at this point in the history
  • Loading branch information
Keskimaki committed Oct 20, 2023
1 parent c69715a commit 68e93b7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,12 @@ const createFeedbackTargets = async (courses) => {
new Date(course.activityPeriod.endDate),
)

const opensAt = formatDate(courseEndDate)
const opensAtWithoutTimeZone = formatWithHours(dateFns.startOfDay(courseEndDate))

const opensAt = parseFromTimeZone(opensAtWithoutTimeZone, {
timeZone: 'Europe/Helsinki',
})

const closesAtWithoutTimeZone = formatWithHours(
dateFns.endOfDay(dateFns.addDays(courseEndDate, 14)),
)
Expand Down

0 comments on commit 68e93b7

Please sign in to comment.