fix: inspector.html stale/updated timestamp broken date parsing
Lint / Python (flake8) (push) Successful in 1m8s
Lint / JS (eslint) (push) Successful in 10s
Security / Python Security (bandit) (push) Successful in 50s
Test / Python Tests (pytest) (push) Successful in 52s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 3s
Lint / Python (flake8) (push) Successful in 1m8s
Lint / JS (eslint) (push) Successful in 10s
Security / Python Security (bandit) (push) Successful in 50s
Test / Python Tests (pytest) (push) Successful in 52s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 3s
Same bug as was just fixed in links.html: data.updated is stored as "YYYY-MM-DD HH:MM:SS UTC" by monitor.py, so appending 'Z' produced "…UTCZ" — an invalid date. The stale-data warning and Updated timestamp in Inspector were silently showing "Invalid Date" and the stale overlay never fired. Fixed to use _toIso() (already global via app.js). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -428,7 +428,7 @@ function renderInspector(data) {
|
|||||||
|
|
||||||
const updEl = document.getElementById('inspector-updated');
|
const updEl = document.getElementById('inspector-updated');
|
||||||
if (updEl && data.updated) {
|
if (updEl && data.updated) {
|
||||||
const updMs = new Date(data.updated + (data.updated.includes('Z') ? '' : 'Z'));
|
const updMs = new Date(_toIso(data.updated));
|
||||||
const ageMin = (Date.now() - updMs) / 60000;
|
const ageMin = (Date.now() - updMs) / 60000;
|
||||||
const timeStr = updMs.toLocaleTimeString();
|
const timeStr = updMs.toLocaleTimeString();
|
||||||
if (ageMin > 15) {
|
if (ageMin > 15) {
|
||||||
|
|||||||
Reference in New Issue
Block a user