Unverified Commit db6f88c0 authored by Thomas Citharel's avatar Thomas Citharel
Browse files

Save timezone to current timezone if no timezone is set



The preferences showed the detected timezone as the selected timezone if no timezone was null. Now we force set it in that case.

Closes #815

Signed-off-by: default avatarThomas Citharel <tcit@tcit.fr>
parent 9a289d65
......@@ -144,7 +144,11 @@ export default class Preferences extends Vue {
if (this.loggedUser?.settings?.timezone) {
return this.loggedUser.settings.timezone;
}
return Intl.DateTimeFormat().resolvedOptions().timeZone;
const detectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
if (this.loggedUser?.settings?.timezone === null) {
this.updateUserSettings({ timezone: detectedTimezone });
}
return detectedTimezone;
}
set selectedTimezone(selectedTimezone: string) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment