Skip to content

fix(passwords): format saved dates with the app's locale - #31

Merged
Github-Samuel merged 2 commits into
mainfrom
fix/21-passwords-date-format
Jul 19, 2026
Merged

Github-Samuel merged 2 commits into
mainfrom
fix/21-passwords-date-format

Conversation

@Epixx1337

Copy link
Copy Markdown
Collaborator

Settings advertised "May 21, 2026" while the Passwords app showed
"17/07/2026".

Two separate causes, both fixed here:

  1. The date was never formatted in the UI at all. listVaultEntries() ran
    DATE_FORMAT(created_at, '%d/%m/%Y') in SQL, so the app just printed a
    string the server had already baked into UK/EU order - unreachable from
    the client and contradicting the Region the settings page claims. It now
    selects UNIX_TIMESTAMP(created_at) and the UI formats it via a new
    formatMediumDate() in lib/time.ts, which uses getLocaleTag() like the
    other shared date helpers. created is typed number (seconds) and the
    dev mocks were moved onto real timestamps.

  2. The Settings row it was compared against was itself a hardcoded string,
    so it could never agree with anything. It now renders through the same
    helper.

Verified across the shipped locales: the reported 17/07/2026 renders as
"July 17, 2026" (en-US), "17 July 2026" (en-GB), "17 juillet 2026" (fr-FR).
Unparseable/missing values return '' and the row hides, as before.

Fixes #21

Epixx1337 and others added 2 commits July 18, 2026 11:16
Settings advertised "May 21, 2026" while the Passwords app showed
"17/07/2026".

Two separate causes, both fixed here:

1. The date was never formatted in the UI at all. listVaultEntries() ran
   DATE_FORMAT(created_at, '%d/%m/%Y') in SQL, so the app just printed a
   string the server had already baked into UK/EU order - unreachable from
   the client and contradicting the Region the settings page claims. It now
   selects UNIX_TIMESTAMP(created_at) and the UI formats it via a new
   formatMediumDate() in lib/time.ts, which uses getLocaleTag() like the
   other shared date helpers. `created` is typed number (seconds) and the
   dev mocks were moved onto real timestamps.

2. The Settings row it was compared against was itself a hardcoded string,
   so it could never agree with anything. It now renders through the same
   helper.

Verified across the shipped locales: the reported 17/07/2026 renders as
"July 17, 2026" (en-US), "17 July 2026" (en-GB), "17 juillet 2026" (fr-FR).
Unparseable/missing values return '' and the row hides, as before.
@Github-Samuel
Github-Samuel merged commit b1fa293 into main Jul 19, 2026
1 check passed
@Github-Samuel
Github-Samuel deleted the fix/21-passwords-date-format branch July 19, 2026 22:34
Github-Samuel pushed a commit that referenced this pull request Sep 15, 2026
Passwords showed a server-baked UK date string that couldn't match the region setting. The server now returns a UNIX timestamp and the UI formats it via a shared formatMediumDate() using the app locale, and the Settings date row renders through the same helper instead of a hardcoded string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

passwords app

2 participants