fix(profile): report the time zone the server uses on /api/user/profile

`/api/auth/me` has reported the resolved zone, the stored one or the
instance default when the stored value is unusable, while
`/api/user/profile` returned the raw column. A client reading the
profile could cut days differently from the server, and sending the
value back in a PATCH was refused.

Both reads, and the profile PATCH answer, now go through one
`resolveStoredTimezone`. The field stays a string and always holds a
valid IANA name. The web account editor already reads the resolved
zone from `/api/auth/me` and saves through the validating timezone
route, so it shows the zone in use and can only write a valid one.
This commit is contained in:
Marc-André Bombeck committed 2026-09-25 07:39:07 +02:00
1 parent 0cc73d3c88
commit be112df972
6 files changed
+124 -11

No files matched your search

+6
View File
@@ -47119,6 +47119,9 @@ components:
- type: "null"
timezone:
type: string
description: "The IANA zone the server cuts this account's days in, the same value `/api/auth/me` reports: the stored
zone, or the instance default when the stored value is not a usable IANA name (since v1.39.1; before, the
raw stored value). Always a valid IANA name, so sending it back in a PATCH is accepted."
timeFormat:
type: string
enum:
@@ -47231,6 +47234,9 @@ components:
- type: "null"
timezone:
type: string
description: "The IANA zone the server cuts this account's days in, the same value `/api/auth/me` reports: the stored
zone, or the instance default when the stored value is not a usable IANA name (since v1.39.1; before, the
raw stored value). Always a valid IANA name, so sending it back in a PATCH is accepted."
timeFormat:
type: string
enum: