This commit is contained in:
@@ -338,6 +338,23 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// Convert a local time only string with date string
|
||||
// to UTC and output as ISO 8601
|
||||
// (used by time and date picker components)
|
||||
//
|
||||
localTimeDateStringToUTC8601String(value, timeZoneName) {
|
||||
//https://moment.github.io/luxon/docs/manual/zones.html#creating-datetimes-in-a-zone
|
||||
if (!timeZoneName) {
|
||||
timeZoneName = this.getTimeZoneName();
|
||||
}
|
||||
//parse in the time in the currently used timezone
|
||||
return window.$gz.DateTime.fromISO(value, {
|
||||
zone: this.timeZoneName
|
||||
})
|
||||
.setZone("utc") //convert to UTC
|
||||
.toISO(); //output as ISO 8601
|
||||
},
|
||||
////////////////////////////////////////////////////////
|
||||
// dynamically set the vuetify language elements from
|
||||
// users localized text (am/pm etc)
|
||||
|
||||
Reference in New Issue
Block a user