ui: if no tz, use local
This commit is contained in:
parent
ebdc2bd08c
commit
18ee36832b
1 changed files with 6 additions and 1 deletions
|
|
@ -83,7 +83,12 @@ export default class SessionSettings {
|
|||
) || { label: 'Local', value: `UTC${userTimezoneOffset}` };
|
||||
|
||||
const savedTz = localStorage.getItem(TIMEZONE)
|
||||
const isLocal = localStorage.getItem(TIMEZONE_LOCAL) === 'true';
|
||||
let isLocal = localStorage.getItem(TIMEZONE_LOCAL) === 'true';
|
||||
if (!savedTz) {
|
||||
localStorage.setItem(TIMEZONE, JSON.stringify(defaultTimezone));
|
||||
localStorage.setItem(TIMEZONE_LOCAL, 'true');
|
||||
isLocal = true;
|
||||
}
|
||||
if (isLocal) {
|
||||
this.timezone = defaultTimezone;
|
||||
this.usingLocal = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue