Make "Last Started" date format on dashboard match "Last Updated"#4229
Merged
Conversation
Copilot
AI
changed the title
[WIP] Update date format for last started display
Make "Last Started" date format on dashboard match "Last Updated"
Jul 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the “Last Started” timestamp in the web dashboard’s Status panel render in the same human-readable style as “Last Updated” (space-separated datetime without ISO T or timezone offset), while keeping the stored sensor value unchanged.
Changes:
- Parse
last_startedinWebInterface.get_status_html()viastr2time()and render it without tzinfo to match the adjacentlast_updatedstyle. - Log parse failures for
last_startedinstead of silently swallowing them. - Add a web functions test to assert the reformatted “Last Started” output is shown and the raw stored ISO+offset form is not.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/predbat/web.py | Normalizes last_started display formatting in the status HTML and logs parse failures. |
| apps/predbat/tests/test_web_functions.py | Adds coverage asserting get_status_html() renders “Last Started” in the expected format. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Status" panel on the main dashboard showed "Last Updated" and "Last Started" in two visually inconsistent formats right next to each other (
2026-07-10 14:40:10.512590vs2026-07-10T01:10:39+0100).Display fix
get_status_html(web.py),last_startedis now parsed withstr2timeand stripped of tzinfo before rendering, so it displays without the ISOTseparator or timezone offset — matching the style oflast_updated.last_startedis untouched (output.pystill writes it viaTIME_FORMAT); this is a display-only change.self.log()instead of being silently swallowed.Tests
test_web_functions.pycoveringget_status_htmlrendering, asserting the reformatted value appears and the raw ISO/timezone form does not.