()
| 227 | * @returns {string} Timezone name (e.g., 'America/New_York') |
| 228 | */ |
| 229 | export function getUserTimezone() { |
| 230 | const configured = String(globalThis.runtimeInfo?.timezone || "").trim(); |
| 231 | if (configured && configured !== "auto") return configured; |
| 232 | return getBrowserTimezone(); |
| 233 | } |
| 234 | |
| 235 | export function getBrowserTimezone() { |
| 236 | return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC"; |
no test coverage detected