This commit is contained in:
@@ -101,6 +101,26 @@ export default {
|
||||
})
|
||||
).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
|
||||
// short date and time
|
||||
|
||||
@@ -392,13 +392,25 @@ export default {
|
||||
if (this.dragEvent) {
|
||||
param.type = this.dragEvent.type;
|
||||
param.id = this.dragEvent.id;
|
||||
(param.start = this.dragEvent.start),
|
||||
(param.end = this.dragEvent.end);
|
||||
param.start = window.$gz.locale.localScheduleFormatToUTC8601String(
|
||||
this.dragEvent.start,
|
||||
this.timeZoneName
|
||||
);
|
||||
param.end = window.$gz.locale.localScheduleFormatToUTC8601String(
|
||||
this.dragEvent.end,
|
||||
this.timeZoneName
|
||||
);
|
||||
} else {
|
||||
param.type = this.extendEvent.type;
|
||||
param.id = this.extendEvent.id;
|
||||
(param.start = this.extendEvent.start),
|
||||
(param.end = this.extendEvent.end);
|
||||
param.start = window.$gz.locale.localScheduleFormatToUTC8601String(
|
||||
this.extendEvent.start,
|
||||
this.timeZoneName
|
||||
);
|
||||
param.end = window.$gz.locale.localScheduleFormatToUTC8601String(
|
||||
this.extendEvent.end,
|
||||
this.timeZoneName
|
||||
);
|
||||
}
|
||||
|
||||
//post it
|
||||
|
||||
Reference in New Issue
Block a user