This commit is contained in:
@@ -19,9 +19,8 @@ export default function initialize() {
|
||||
//Fetch the core localized text keys that will always be required by user
|
||||
window.$gz.locale
|
||||
.fetch(window.$gz.locale.coreKeys)
|
||||
|
||||
.then(function initializeNavPanel() {
|
||||
console.log("INIT NAV PANEL");
|
||||
// console.log("INIT NAV PANEL");
|
||||
var key = 0;
|
||||
var sub = [];
|
||||
|
||||
|
||||
@@ -235,7 +235,31 @@ export default {
|
||||
return window.$gz.locale.utcDateStringTo8601TimeOnlyString(this.value);
|
||||
},
|
||||
set(value) {
|
||||
//this.value = value;
|
||||
//https://moment.github.io/luxon/docs/manual/zones.html#creating-datetimes-in-a-zone
|
||||
//var overrideZone = DateTime.fromISO("2017-05-15T09:10:23", { zone: "Europe/Paris" });
|
||||
//set this.date to utc iso string based on incoming value which is same format as set above
|
||||
//so need to take the time portion, construct a date object
|
||||
console.log("timeOnly:set value incoming is:");
|
||||
console.log(value);
|
||||
|
||||
console.log("this.value is:");
|
||||
console.log(this.value);
|
||||
|
||||
console.log("Attempting parse from:");
|
||||
console.log(this.dateOnly + "T" + value);
|
||||
|
||||
var overrideZone = window.$gz.DateTime.fromISO(
|
||||
this.dateOnly + "T" + value,
|
||||
{ zone: this.timeZoneName }
|
||||
);
|
||||
console.log("timeOnly:conversion to overrideZone:");
|
||||
console.log(overrideZone.toString());
|
||||
var utcZoned = overrideZone.setZone("utc");
|
||||
|
||||
console.log("output as utc iso string:");
|
||||
console.log(utcZoned.toISO());
|
||||
|
||||
//this.date=overrideZone.dt.toISO();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import errorHandler from "./api/errorhandler";
|
||||
import NProgress from "nprogress";
|
||||
import "nprogress/nprogress.css";
|
||||
import dayjs, { Dayjs } from "dayjs";
|
||||
import { DateTime } from "luxon";
|
||||
import UTC from "dayjs/plugin/utc"; // load on demand
|
||||
dayjs.extend(UTC); // use plugin
|
||||
import lodash from "./libs/lodash.min.js";
|
||||
@@ -57,6 +58,7 @@ window.$gz = {
|
||||
dialog: gzdialog,
|
||||
util: gzutil,
|
||||
dayjs: dayjs,
|
||||
DateTime: DateTime,
|
||||
_: lodash,
|
||||
api: gzapi,
|
||||
form: gzform,
|
||||
|
||||
Reference in New Issue
Block a user