Struct google_maps::time_zone::response::Response
source · pub struct Response {
pub dst_offset: Option<i16>,
pub error_message: Option<String>,
pub raw_offset: Option<i16>,
pub status: Status,
pub time_zone_id: Option<Tz>,
pub time_zone_name: Option<String>,
}
Expand description
The response from the Google Maps Time Zone API will be stored in this structure.
§Time Zone Responses
For each valid request, the time zone service will return a response in the format indicated within the request URL.
The local time of a given location is the sum of the timestamp parameter, and the dstOffset and rawOffset fields from the result.
Fields§
§dst_offset: Option<i16>
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
time
.
error_message: Option<String>
More detailed information about the reasons behind the given status
code, if other than OK
.
Note: This field is not guaranteed to be always present, and its content is subject to change.
raw_offset: Option<i16>
The offset from UTC (in seconds) for the given location. This does not take into effect daylight savings.
status: Status
The status of the response.
time_zone_id: Option<Tz>
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, and currently available in file
timezone.xml.
When a timezone has several IDs, the canonical one is returned. In
timezone.xml, this is the first alias of each timezone. For example,
Asia/Calcutta
is returned, not Asia/Kolkata
.
time_zone_name: Option<String>
A string containing 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”