fix: datetime displays now respect the app's selected locale#2366
Merged
kmendell merged 2 commits intoApr 13, 2026
Conversation
date displays across event details, docker info, job cards, and vuln scans were calling toLocaleString() with no locale argument, which ignores whatever language the user picked in the app and falls back to the OS setting. route everything through formatDateTime/formatDateTimeShort utilities backed by date-fns, which already picks up the paraglide locale set via setDefaultOptions. fixes getarcaneapp#2349
Member
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
review caught that toLocaleTimeString() was time-only but formatDateTime switched it to full date+time, which would overflow the UI element. added formatTime utility (date-fns 'pp' pattern) and swapped it in.
kmendell
approved these changes
Apr 13, 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
Several components were calling
toLocaleString()/toLocaleTimeString()without passing a locale argument, so date displays always followed the OS system locale regardless of what language the user picked inside Arcane.Fix
Added
formatDateTimeandformatDateTimeShortutilities tolocale.util.tsbacked bydate-fns, which already picks up the paraglide locale viasetDefaultOptions(set when the user changes language). Updated the five affected components:event-details-dialog.sveltedocker-info-dialog.sveltejob-card.sveltevulnerability-scan-item.sveltevulnerability-scan-panel.svelteNo behaviour change for users who haven't changed locale. For everyone else, dates now match the language they selected.
Fixes #2349
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR adds
formatDateTime/formatDateTimeShorthelpers tolocale.util.tsbacked bydate-fns, then updates five components to use them so that date displays respect the user's in-app locale choice rather than the OS locale.vulnerability-scan-item.sveltethe original call wastoLocaleTimeString()(time-only), but the replacement isformatDateTime()which outputs the full date + time via the'PPpp'pattern. This is a visible format change for all users regardless of locale, and may overflow UI elements sized for a time-only string.Confidence Score: 4/5
Safe to merge after confirming whether the time-only → date+time change in vulnerability-scan-item is intentional.
Four of the five component changes are clean locale-only fixes. The one issue — toLocaleTimeString() replaced by formatDateTime() in vulnerability-scan-item.svelte — changes the displayed information (time-only → date+time) for every user, which is a real behaviour change that should be explicitly confirmed before merging.
frontend/src/lib/components/vulnerability/vulnerability-scan-item.svelte
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix: use app locale for datetime formatt..." | Re-trigger Greptile