get_timezone
Retrieve timezone data and local time for any location using city names, coordinates, or IP addresses. Returns IANA timezone ID, current local time, and Unix timestamp.
Instructions
Get timezone and current local time for any location. Returns IANA timezone ID (e.g. Europe/London), local time string, and unix epoch.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Location query — city name, lat/lon, zip, postcode, IATA, or IP. |
Implementation Reference
- src/index.ts:322-326 (handler)The handler implementation for the "get_timezone" tool in the switch statement.
case "get_timezone": { const { q } = args as { q: string }; result = await weatherRequest("/timezone.json", { q }); break; } - src/index.ts:196-209 (schema)The tool definition and schema registration for "get_timezone".
name: "get_timezone", description: "Get timezone and current local time for any location. Returns IANA timezone ID (e.g. Europe/London), local time string, and unix epoch.", inputSchema: { type: "object", properties: { q: { type: "string", description: "Location query — city name, lat/lon, zip, postcode, IATA, or IP.", }, }, required: ["q"], }, },