Retrieves time zone information.
Request parameters
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.google-timezone-api+json
is recommended.
Response 200 OK
OK
{ "dstOffset": 3600, "rawOffset": -28800, "status": "OK", "timeZoneId": "America/Los_Angeles", "timeZoneName": "hora de verano del PacĂfico" }
Response 400 Bad Request
The 400 (Bad Request) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax)
{ "error": { "code": "InvalidGoogleCuratedContentRequest", "message": "Invalid request. Invalid 'location' or 'timestamp' parameter." } }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
GetTimeZoneResponse
The offset for daylight-savings time in seconds. This will be zero if the time zone is not in Daylight Savings Time during the specified timestamp.
The offset from UTC (in seconds) for the given location. This does not take into effect daylight savings.
A string containing the ID of the time zone, such as "America/Los_Angeles" or "Australia/Sydney". These IDs are defined by Unicode Common Locale Data Repository (CLDR) project.
The long form name of the time zone. This field will be localized if the language parameter is set. eg. Pacific Daylight Time or Australian Eastern Daylight Time.
Detailed information about the reasons behind the given status code. Included if status other than OK.
{ "type": "object", "properties": { "status": { "$ref": "#/components/schemas/TimeZoneStatus" }, "dstOffset": { "type": "number", "description": "The offset for daylight-savings time in seconds. This will be zero if the time zone is not in Daylight Savings Time during the specified timestamp." }, "rawOffset": { "type": "number", "description": "The offset from UTC (in seconds) for the given location. This does not take into effect daylight savings." }, "timeZoneId": { "type": "string", "description": "A string containing the ID of the time zone, such as \"America/Los_Angeles\" or \"Australia/Sydney\". These IDs are defined by Unicode Common Locale Data Repository (CLDR) project." }, "timeZoneName": { "type": "string", "description": "The long form name of the time zone. This field will be localized if the language parameter is set. eg. Pacific Daylight Time or Australian Eastern Daylight Time." }, "errorMessage": { "type": "string", "description": "Detailed information about the reasons behind the given status code. Included if status other than OK." } }, "required": [ "status" ], "additionalProperties": false }
TimeZoneStatus
The status of the time zone request.
{ "type": "string", "enum": [ "OK", "INVALID_REQUEST", "OVER_DAILY_LIMIT", "OVER_QUERY_LIMIT", "REQUEST_DENIED", "UNKNOWN_ERROR", "ZERO_RESULTS" ], "description": "The status of the time zone request." }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?