fix schedule time
This commit is contained in:
parent
aef8920ead
commit
56df2ae947
@ -39,7 +39,11 @@ async function makeScheduleTable() {
|
|||||||
const timeslots = timeslotData
|
const timeslots = timeslotData
|
||||||
.map(({ date, times }) => ({
|
.map(({ date, times }) => ({
|
||||||
dateString: date,
|
dateString: date,
|
||||||
date: new Date(date),
|
// yea soo this hack makes the Date UTC
|
||||||
|
date: new Date(
|
||||||
|
new Date(date).getTime() -
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000,
|
||||||
|
),
|
||||||
times,
|
times,
|
||||||
}))
|
}))
|
||||||
.toSorted((a, b) => a.date.getTime() - b.date.getTime());
|
.toSorted((a, b) => a.date.getTime() - b.date.getTime());
|
||||||
@ -47,7 +51,9 @@ async function makeScheduleTable() {
|
|||||||
let tableHtml = `<tr>
|
let tableHtml = `<tr>
|
||||||
${
|
${
|
||||||
timeslots.map((ts) =>
|
timeslots.map((ts) =>
|
||||||
`<th>${weekDayNames[ts.date.getUTCDay()]} ${ts.date.getUTCDay()}. ${
|
`<th>${
|
||||||
|
weekDayNames[ts.date.getUTCDay()]
|
||||||
|
} ${ts.date.getUTCDate()}. ${
|
||||||
monthNames[ts.date.getUTCMonth()]
|
monthNames[ts.date.getUTCMonth()]
|
||||||
}</th>`
|
}</th>`
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user