get_timezone
Pack: geonames · Endpoint: https://gateway.pipeworx.io/geonames/mcp
Get timezone information for a latitude/longitude location. Returns timezone ID, GMT offset, DST offset, current local time, sunrise, and sunset. Example: get_timezone(40.7128, -74.0060) for New York.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | yes | GeoNames username |
lat | number | yes | Latitude (e.g., 40.7128) |
lng | number | yes | Longitude (e.g., -74.0060) |
Example call
Arguments
{
"_apiKey": "your-geonames-api-key",
"lat": 40.7128,
"lng": -74.006
}
curl
curl -X POST https://gateway.pipeworx.io/geonames/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_timezone","arguments":{"_apiKey":"your-geonames-api-key","lat":40.7128,"lng":-74.006}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_timezone', {
"_apiKey": "your-geonames-api-key",
"lat": 40.7128,
"lng": -74.006
});
Response shape
Always returns: timezone_id, gmt_offset, raw_offset, dst_offset, current_time, sunrise, sunset, country_code, country_name, latitude, longitude
| Field | Type | Description |
|---|---|---|
timezone_id | string | null | IANA timezone identifier |
gmt_offset | number | null | Current GMT offset in hours |
raw_offset | number | null | Raw offset from GMT |
dst_offset | number | null | Daylight saving time offset |
current_time | string | null | Current local time at location |
sunrise | string | null | Sunrise time |
sunset | string | null | Sunset time |
country_code | string | null | ISO country code |
country_name | string | null | Full country name |
latitude | number | Latitude coordinate |
longitude | number | Longitude coordinate |
Full JSON Schema
{
"type": "object",
"properties": {
"timezone_id": {
"type": [
"string",
"null"
],
"description": "IANA timezone identifier"
},
"gmt_offset": {
"type": [
"number",
"null"
],
"description": "Current GMT offset in hours"
},
"raw_offset": {
"type": [
"number",
"null"
],
"description": "Raw offset from GMT"
},
"dst_offset": {
"type": [
"number",
"null"
],
"description": "Daylight saving time offset"
},
"current_time": {
"type": [
"string",
"null"
],
"description": "Current local time at location"
},
"sunrise": {
"type": [
"string",
"null"
],
"description": "Sunrise time"
},
"sunset": {
"type": [
"string",
"null"
],
"description": "Sunset time"
},
"country_code": {
"type": [
"string",
"null"
],
"description": "ISO country code"
},
"country_name": {
"type": [
"string",
"null"
],
"description": "Full country name"
},
"latitude": {
"type": "number",
"description": "Latitude coordinate"
},
"longitude": {
"type": "number",
"description": "Longitude coordinate"
}
},
"required": [
"timezone_id",
"gmt_offset",
"raw_offset",
"dst_offset",
"current_time",
"sunrise",
"sunset",
"country_code",
"country_name",
"latitude",
"longitude"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"geonames": {
"url": "https://gateway.pipeworx.io/geonames/mcp"
}
}
}
See Getting Started for client-specific install steps.