Skip to main content
Glama

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
NameRequiredDescriptionDefault
qYesLocation query — city name, lat/lon, zip, postcode, IATA, or IP.

Implementation Reference

  • 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;
    }
  • 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"],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/weatherapicom/weatherapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server