This commit is contained in:
2021-06-01 23:09:06 +00:00
parent d8fd6d96cf
commit 85f18a1cdf
2 changed files with 19 additions and 0 deletions

View File

@@ -233,6 +233,21 @@ export default {
return ret;
},
///////////////////////////////////////////////
// UTC ISO 8601 string add minutes
// and return as UTC ISO 8601 string
// (used to set automatic / default adjusted times)
//
addMinutesToUTC8601String(val, minutes) {
if (!val || val == "" || minutes == null || minutes == 0) {
return val;
}
//instantiate a luxon date object from val which is assumed to be an iso string
let dt = window.$gz.DateTime.fromISO(val);
//add minutes
dt = dt.plus({ minutes: minutes });
return dt.toUTC().toString();
},
///////////////////////////////////////////////
// Local now timestamp converted to timeZoneName
// and output as ISO 8601
// (used to inform server of local client time)

View File

@@ -408,6 +408,10 @@ export default {
this.activeItemIndex
].startDate;
console.log("Start date value is now", val);
let d = window.$gz.locale.addMinutesToUTC8601String(val, 60);
console.log("start plus 60 minutes is:", d);
},
handleStopDateChange: function() {
let val = this.value.items[this.activeWoItemIndex].scheduledUsers[