Add X-Timezone header to all API requests

Send the device's IANA timezone identifier (e.g., "America/Los_Angeles")
with every API request to enable timezone-aware overdue task detection.

Platform implementations:
- Android/JVM: TimeZone.getDefault().id
- iOS: NSTimeZone.localTimeZone.name
- JS/WASM: Intl.DateTimeFormat().resolvedOptions().timeZone

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-13 00:04:44 -06:00
parent 258ccf7354
commit a3e1c338d2
6 changed files with 37 additions and 0 deletions

View File

@@ -16,6 +16,13 @@ expect fun createHttpClient(): HttpClient
*/
expect fun getDeviceLanguage(): String
/**
* Get the device's timezone identifier (e.g., "America/Los_Angeles", "Europe/London").
* This is used to set the X-Timezone header for API requests
* so the server can calculate overdue tasks correctly based on the user's local time.
*/
expect fun getDeviceTimezone(): String
object ApiClient {
val httpClient = createHttpClient()