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)