This commit is contained in:
lesion 2023-03-28 21:48:26 +02:00
parent 2608761a44
commit ee8a9843b3
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -97,8 +97,8 @@ const exportController = {
const settings = res.locals.settings const settings = res.locals.settings
const eventsMap = events.map(e => { const eventsMap = events.map(e => {
const tmpStart = moment.unix(e.start_datetime) const tmpStart = DateTime.fromSeconds(e.start_datetime)
const start = tmpStart.utc(true).format('YYYY-M-D-H-m').split('-').map(Number) const start = [ tmpStart.year, tmpStart.month, tmpStart.day, tmpStart.hour, tmpStart.minute ]
const ret = { const ret = {
uid: `${e.id}@${settings.hostname}`, uid: `${e.id}@${settings.hostname}`,
@ -114,8 +114,8 @@ const exportController = {
} }
if (e.end_datetime) { if (e.end_datetime) {
const tmpEnd = moment.unix(e.end_datetime) const tmpEnd = DateTime.fromSeconds(e.end_datetime)
const end = tmpEnd.utc(true).format('YYYY-M-D-H-m').split('-').map(Number) const end = [ tmpEnd.year, tmpEnd.month, tmpEnd.day, tmpEnd.hour, tmpEnd.minute ]
ret.end = end ret.end = end
} }