fix timezone events in home calendar

This commit is contained in:
lesion 2022-08-09 14:57:56 +02:00
parent 9c82b54e68
commit 63ca8b0fde
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -7,7 +7,7 @@ export function attributesFromEvents (_events) {
let attributes = []
const now = dayjs().unix()
for(let e of _events) {
const key = dayjs.unix(e.start_datetime).format('YYYYMMDD')
const key = dayjs.unix(e.start_datetime).tz().format('YYYYMMDD')
const c = e.start_datetime < now ? 'vc-past' : ''
const i = attributes.find(a => a.day === key)