Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8ec6294

Browse files
committed
Use browser default timezone.
1 parent 96d7fda commit 8ec6294

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/structures/LoggedInView.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ class LoggedInView extends React.Component<IProps, IState> {
205205
}
206206

207207
private onTimezoneUpdate = async (): Promise<void> => {
208-
console.log("Triggering timezoen update", SettingsStore);
209208
if (!SettingsStore.getValue("userTimezonePublish")) {
210209
// Ensure it's deleted
211210
try {
@@ -215,7 +214,9 @@ class LoggedInView extends React.Component<IProps, IState> {
215214
}
216215
return;
217216
}
218-
const currentTimezone = SettingsStore.getValue("userTimezone");
217+
const currentTimezone = SettingsStore.getValue("userTimezone")
218+
// If the timezone is empty, then use the browser timezone.
219+
|| Intl.DateTimeFormat().resolvedOptions().timeZone;
219220
if (!currentTimezone || typeof currentTimezone !== "string") {
220221
return;
221222
}

0 commit comments

Comments
 (0)