This commit is contained in:
@@ -101,6 +101,26 @@ export default {
|
|||||||
})
|
})
|
||||||
).getTime();
|
).getTime();
|
||||||
},
|
},
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
// Convert a local schedule epoch timestamp
|
||||||
|
// to UTC and output as ISO 8601
|
||||||
|
//
|
||||||
|
//
|
||||||
|
localScheduleFormatToUTC8601String(value, timeZoneName) {
|
||||||
|
if (!timeZoneName) {
|
||||||
|
timeZoneName = this.getResolvedTimeZoneName();
|
||||||
|
}
|
||||||
|
|
||||||
|
//parse in the time in the currently used timezone
|
||||||
|
let ret = window.$gz.DateTime.fromMillis(value, {
|
||||||
|
zone: timeZoneName
|
||||||
|
});
|
||||||
|
|
||||||
|
ret = ret.setZone("utc"); //convert to UTC
|
||||||
|
ret = ret.toISO(); //output as ISO 8601
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
},
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Turn a utc date into a displayable
|
// Turn a utc date into a displayable
|
||||||
// short date and time
|
// short date and time
|
||||||
|
|||||||
@@ -392,13 +392,25 @@ export default {
|
|||||||
if (this.dragEvent) {
|
if (this.dragEvent) {
|
||||||
param.type = this.dragEvent.type;
|
param.type = this.dragEvent.type;
|
||||||
param.id = this.dragEvent.id;
|
param.id = this.dragEvent.id;
|
||||||
(param.start = this.dragEvent.start),
|
param.start = window.$gz.locale.localScheduleFormatToUTC8601String(
|
||||||
(param.end = this.dragEvent.end);
|
this.dragEvent.start,
|
||||||
|
this.timeZoneName
|
||||||
|
);
|
||||||
|
param.end = window.$gz.locale.localScheduleFormatToUTC8601String(
|
||||||
|
this.dragEvent.end,
|
||||||
|
this.timeZoneName
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
param.type = this.extendEvent.type;
|
param.type = this.extendEvent.type;
|
||||||
param.id = this.extendEvent.id;
|
param.id = this.extendEvent.id;
|
||||||
(param.start = this.extendEvent.start),
|
param.start = window.$gz.locale.localScheduleFormatToUTC8601String(
|
||||||
(param.end = this.extendEvent.end);
|
this.extendEvent.start,
|
||||||
|
this.timeZoneName
|
||||||
|
);
|
||||||
|
param.end = window.$gz.locale.localScheduleFormatToUTC8601String(
|
||||||
|
this.extendEvent.end,
|
||||||
|
this.timeZoneName
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//post it
|
//post it
|
||||||
|
|||||||
Reference in New Issue
Block a user