use local instance timezone everywhere #151

This commit is contained in:
lesion
2022-04-27 11:58:58 +02:00
parent 6776b1b1b1
commit 35e44a8a80
7 changed files with 72 additions and 65 deletions

View File

@@ -84,7 +84,7 @@ export default {
validate ({ store }) {
return (store.state.auth.loggedIn || store.state.settings.allow_anon_event)
},
async asyncData ({ params, $axios, error, store }) {
async asyncData ({ params, $axios, error }) {
if (params.edit) {
const data = { event: { place: {}, media: [] } }
data.id = params.edit
@@ -101,8 +101,8 @@ export default {
data.event.place.address = event.place.address || ''
data.date = {
recurrent: event.recurrent,
from: new Date(dayjs.unix(event.start_datetime)),
due: new Date(dayjs.unix(event.end_datetime)),
from: dayjs.unix(event.start_datetime).toDate(),
due: dayjs.unix(event.end_datetime).toDate(),
multidate: event.multidate,
fromHour: true,
dueHour: true
@@ -118,8 +118,8 @@ export default {
return {}
},
data () {
const month = dayjs().month() + 1
const year = dayjs().year()
const month = dayjs.tz().month() + 1
const year = dayjs.tz().year()
return {
mdiFileImport, mdiFormatTitle, mdiTagMultiple, mdiCloseCircle,
valid: false,