Fix timezone consistency: apply server timezone everywhere in the app

- Extract getServerTimezone() helper in timeUtils.js; apply it in
  formatChartTime and formatLocalTimeOnly (previously ignored TZ)
- Status.js: remove local formatLocalTime (was bare toLocaleString),
  import the shared util that reads server timezone
- SettingsWizard: immediately update localStorage when timezone is saved
  so new value takes effect without waiting for cache to expire

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-06 16:48:12 -04:00
1 parent 5e98e9aa05
commit 98e0949d08
3 files changed
+38 -53

No files matched your search

+1 -8
View File
@@ -1,5 +1,6 @@
import React, { useEffect, useState } from 'react';
import axios from 'axios';
import { formatLocalTime } from './utils/timeUtils';
import './Status.css';
function Status() {
@@ -31,14 +32,6 @@ function Status() {
}
};
const formatLocalTime = (timestamp) => {
try {
return new Date(timestamp).toLocaleString();
} catch {
return timestamp;
}
};
const formatDuration = (ms) => {
const seconds = Math.floor(ms / 1000);
const minutes = Math.floor(seconds / 60);