This commit is contained in:
2021-02-02 20:50:54 +00:00
parent c1b6c5e336
commit 6c55c47864

View File

@@ -26,6 +26,8 @@ export default {
}, },
/////////////////////////////////////////// ///////////////////////////////////////////
// Get users default time zone // Get users default time zone
// first check if overriden in useroptions
// if not then use browsers own setting
//https://www.iana.org/time-zones //https://www.iana.org/time-zones
//https://en.wikipedia.org/wiki/List_of_tz_database_time_zones //https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
getResolvedTimeZoneName() { getResolvedTimeZoneName() {
@@ -204,28 +206,28 @@ export default {
if (!timeZoneName) { if (!timeZoneName) {
timeZoneName = this.getResolvedTimeZoneName(); timeZoneName = this.getResolvedTimeZoneName();
} }
// let ret = window.$gz.DateTime.local() let ret = window.$gz.DateTime.local()
// .setZone(timeZoneName, { keepLocalTime: true }) .setZone(timeZoneName)
// .toString(); .toString();
console.log("clientlocatimeblahblah", ret);
// let l = new Date();
let l = new Date(); // //DateTime.fromISO("2017-05-15T09:10:23", { zone: "Europe/Paris" });
// let ret = window.$gz.DateTime.fromObject({
// zone: timeZoneName,
// year: l.getFullYear(),
// month: l.getMonth() + 1,
// day: l.getDate(),
// hour: l.getHours(),
// minute: l.getMinutes(),
// second: l.getSeconds(),
// millisecond: l.getMilliseconds()
// });
//DateTime.fromISO("2017-05-15T09:10:23", { zone: "Europe/Paris" }); // console.log("clientLocalZoneTimeStamp", {
let ret = window.$gz.DateTime.fromObject({ // zoneName: timeZoneName,
zone: timeZoneName, // ret: ret
year: l.getFullYear(), // });
month: l.getMonth() + 1,
day: l.getDate(),
hour: l.getHours(),
minute: l.getMinutes(),
second: l.getSeconds(),
millisecond: l.getMilliseconds()
});
console.log("clientLocalZoneTimeStamp", {
zoneName: timeZoneName,
ret: ret
});
return ret; return ret;
}, },
/////////////////////////////////////////////// ///////////////////////////////////////////////