mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-09-18 10:31:31 -04:00
Merge pull request #1735 from Valiante/patch-2
Fix: clock shows wrong timezone after header reload (#1640)
This commit is contained in:
1 file changed
+5
-3
+5
-3
@@ -88,14 +88,16 @@ function deleteCookie (cookie) {
|
||||
// -----------------------------------------------------------------------------
|
||||
// cacheStrings, getString, getLangCode moved to cache.js
|
||||
|
||||
const tz = getSetting("TIMEZONE") || 'Europe/Berlin';
|
||||
const LOCALE = getSetting('UI_LOCALE') || 'en-GB';
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// DateTime utilities
|
||||
// -----------------------------------------------------------------------------
|
||||
function localizeTimestamp(input) {
|
||||
|
||||
// Read fresh on every call (not a module-level const): getSetting() reads
|
||||
// a localStorage cache that clearCache() wipes before reloading, so a
|
||||
// stale/hardcoded fallback could otherwise stick for the page's lifetime. See #1640.
|
||||
const tz = getSetting("TIMEZONE") || 'Europe/Berlin';
|
||||
const LOCALE = getSetting('UI_LOCALE') || 'en-GB';
|
||||
|
||||
input = String(input || '').trim();
|
||||
|
||||
|
||||
Reference in new issue
Block a user