Skip to content

Sync the browser's IANA timezone for the authenticated user

POST
/api/v1/context/timezone
curl --request POST \
--url http://localhost:11044/api/v1/context/timezone \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "zone": "example" }'

Validates the timezone against ZoneId; rejects invalid zones. Returns 204 whether or not the value changed.

zone: the browser’s IANA time zone id (e.g. Europe/London, as Intl.DateTimeFormat().resolvedOptions().timeZone reports it); anything java.time.ZoneId parses is accepted, fixed offsets such as +02:00 included. A new zone is saved on the user and the world’s time zone refreshed. A blank or unparseable zone is ignored and still answers 204, leaving the stored value as it was

Media typeapplication/json

The browser’s time zone, pushed by POST /context/timezone to keep the signed-in user’s stored time zone in step with it

object
zone
required

Time zone id as the browser reports it, normally IANA such as Europe/London. Blank, or not an id java.time.ZoneId accepts, it is ignored and the stored zone is left as it was

string

Example generated

{
"zone": "example"
}

No Content