This commit is contained in:
2020-02-06 23:01:29 +00:00
parent 2e8d6945f7
commit 742fad6125
3 changed files with 31 additions and 3 deletions

View File

@@ -229,16 +229,20 @@ export default {
//-----------------
//expects just the hours minutes seconds portion: 18:18:49
//TODO: Need to convert to desired time zone first or the control will show the UTC time instead
//console.log(new Date().toLocaleTimeString('sv-SE',{timeZone:"America/Vancouver"}));
//console.log(new Date().toLocaleTimeString('sv-SE',{timeZone:"UTC"}));
get() {
if (this.value) {
console.log(this.value.substr(11, 8));
return this.value.substr(11, 8);
//Ok, this looks weird but sv-SE is the same format as iso8601 format required so if this breaks that's why
return new Date(this.value).toLocaleTimeString("sv-SE", {
timeZone: this.timeZoneName
});
} else {
return "";
}
},
set(value) {
this.value = value;
//this.value = value;
}
}
}