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

Commit

Permalink
Use browser default timezone.
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Sep 9, 2024
1 parent 96d7fda commit 8ec6294
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/structures/LoggedInView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ class LoggedInView extends React.Component<IProps, IState> {
}

private onTimezoneUpdate = async (): Promise<void> => {
console.log("Triggering timezoen update", SettingsStore);
if (!SettingsStore.getValue("userTimezonePublish")) {
// Ensure it's deleted
try {
Expand All @@ -215,7 +214,9 @@ class LoggedInView extends React.Component<IProps, IState> {
}
return;
}
const currentTimezone = SettingsStore.getValue("userTimezone");
const currentTimezone = SettingsStore.getValue("userTimezone")
// If the timezone is empty, then use the browser timezone.
|| Intl.DateTimeFormat().resolvedOptions().timeZone;
if (!currentTimezone || typeof currentTimezone !== "string") {
return;
}
Expand Down

0 comments on commit 8ec6294

Please sign in to comment.