Run the PHP layer on the host's clock, not UTC

PHP defaults to UTC on Unraid while every bash script stamps local time, and the
two write into the same files — conf_changes.log was four hours out from every
log you would correlate it against. The parsing half was worse: vv_ai_syslog_ts()
reads local-time syslog lines through strtotime() under UTC, landing every event
four hours early, and the repair sweep bounds its scan to "since the last pass"
— so a fault that had just happened could read as four hours old and fall
outside the window. Also fixes date-string comparisons against bandwidth and
cleanup dbs, which bash writes with local dates.
This commit is contained in:
Gmer4Lfe
2026-08-14 19:49:48 -04:00
parent 7ebe8c0891
commit 7f22bb0612
2 changed files with 36 additions and 1 deletions
+3 -1
View File
@@ -743,7 +743,9 @@ function vvTempColor(tempC, transport) {
function vvFmt(v) { return v >= 1000 ? (v / 1000).toFixed(1) + ' TB' : v + ' GB'; }
function vvFmtRate(mbs) {
if (mbs >= 1000) return (mbs / 1024).toFixed(1) + ' GB/s';
// 1024 both sides: the source is MiB/s (common.php divides by 1048576), so the threshold has to
// match the divisor or the unit switches early between 1000 and 1024.
if (mbs >= 1024) return (mbs / 1024).toFixed(1) + ' GB/s';
if (mbs >= 100) return Math.round(mbs) + ' MB/s';
return mbs.toFixed(1) + ' MB/s';
}