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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user