Repository navigation
Format console times when a request has no Accept-Language - #60
Merged
Merged
Conversation
JSTL's fmt tags find the locale from the request's Accept-Language header, not the server's default, and with none they print the value's toString(). So a request without the header, such as from a script, got the console's last update times as "Mon Oct 05 19:10:48 UTC 2026" instead of "Oct 05 2026 19:10:48". Set JSTL's fallback locale to en-US, for every page's fmt tags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
slominskir
approved these changes
Oct 5, 2026
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.
What changed
JSTL's
fmttags find the locale from the request's Accept-Language header, not from the server's default. With no header they print the value'stoString(). So on/console, a request without the header, such as from a script, got the last update times asMon Oct 05 19:10:48 UTC 2026instead of the page's pattern,Oct 05 2026 19:10:48.web.xmlnow sets JSTL's fallback locale (jakarta.servlet.jsp.jstl.fmt.fallbackLocale) toen-US. This applies to every page'sfmttags, includingfmt:formatNumberon/consoleand/disconnected-pvs. Requests that send Accept-Language are unchanged; for example,de-DEstill getsOkt. 05 2026.This was noticed while adding the disconnected PVs report (#58).
Deployment
None.
Checks
./gradlew spotlessCheck test: passed, 84 unit tests../gradlew integrationTest, after rebuilding the image: passed, 27 tests. The newConsoleTestchecks thatchannel1's last update on/consolefollows the page's pattern when the request has no Accept-Language. It failed against the image without this change.By hand with curl on
/console, while monitoringHELLO:Mon Oct 05 19:10:48 UTC 2026Oct 05 2026 19:13:33en-USOct 05 2026 19:10:42Oct 05 2026 19:13:33de-DEOkt. 05 2026 19:10:48Okt. 05 2026 19:13:33Decisions
web.xmlsetting rather than formatting in Java. The disconnected PVs report formats its times in Java, so its JS can compare them as text. The console doesn't need that, and the fallback locale fixes everyfmttag at once while keeping the console's existing format.🤖 Generated with Claude Code