Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions front/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Loading