Table of contents
Google Curated Content
Download API definition:
This operation is a Technical Preview and is available for testing purposes only. Do not use in production.
GET https://dev-api.bentley.com/curated-content/google/timezone?location&timestamp[&language]

Retrieves time zone information.

Request parameters

Name
Required?
Description
location
Yes
timestamp
Yes
language
No

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.google-timezone-api+json is recommended.

Response 200 OK

OK

json
{
    "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)

json
{
    "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.

json
{
    "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.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

GetTimeZoneResponse

Name
Type
Description
dstOffset
Number

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
Number

The offset from UTC (in seconds) for the given location. This does not take into effect daylight savings.

timeZoneId
String

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
String

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
String

Detailed information about the reasons behind the given status code. Included if status other than OK.

TimeZoneStatus

The status of the time zone request.

Name
Type
Description
OK
String
INVALID_REQUEST
String
OVER_DAILY_LIMIT
String
OVER_QUERY_LIMIT
String
REQUEST_DENIED
String
UNKNOWN_ERROR
String
ZERO_RESULTS
String

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target of the error.

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.

Name
Type
Description
error

Error information.

Was this page helpful?