bugfix: appointment hours now use the client timezone on UTC servers.
Logical API errors throw stable codes so users see translated messages instead of a generic bad request. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
8
frontend/src/lib/i18n/clientTimeZone.ts
Normal file
8
frontend/src/lib/i18n/clientTimeZone.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/** Browser IANA zone (e.g. Asia/Tehran). Used so the UTC server can interpret wall-clock hours. */
|
||||
export function getClientTimeZone(): string {
|
||||
try {
|
||||
return Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC';
|
||||
} catch {
|
||||
return 'UTC';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user