GnistAI GnistAI
Log in

Getting Started with World Time

Current time, timezone conversions, and timezone information using the IANA tz database.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Utilities

Data source: IANA tz database (built-in)

Overview

World Time performs computations on your inputs — no external data source required. This tutorial covers all 5 tools with parameter reference and code examples.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-world-time": {
      "url": "https://context.gnist.ai/mcp/world-time/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (5)

get_current_time

Get the current date and time in a specific timezone. Returns date, time, UTC offset, DST status, and day of week. Args: timezone: IANA timezone name (e.g. "Europe/Oslo", "America/New_York", "UTC").

ParameterTypeRequiredDescription
timezonestringrequired
curl -X POST "https://context.gnist.ai/mcp/world-time/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_current_time", "arguments": {"timezone": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/world-time/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'timezone': 'example'}, 'name': 'get_current_time'}},
)
print(resp.json())

convert_time

Convert a time from one timezone to another. If no time is provided, converts the current time. Args: from_timezone: Source IANA timezone name (e.g. "Europe/London"). to_timezone: Target IANA timezone name (e.g. "Asia/Tokyo"). time: Optional ISO 8601 datetime without timezone (e.g. "2026-03-17T14:30:00"). If omitted, uses the current time.

ParameterTypeRequiredDescription
from_timezonestringrequired
to_timezonestringrequired
timeanyoptional
curl -X POST "https://context.gnist.ai/mcp/world-time/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "convert_time", "arguments": {"from_timezone": "example", "to_timezone": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/world-time/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'from_timezone': 'example', 'to_timezone': 'example'},
            'name': 'convert_time'}},
)
print(resp.json())

get_timezone_info

Get detailed information about a timezone. Returns UTC offset, DST status, abbreviation, region, and current time. Args: timezone: IANA timezone name (e.g. "Europe/Oslo", "US/Eastern").

ParameterTypeRequiredDescription
timezonestringrequired
curl -X POST "https://context.gnist.ai/mcp/world-time/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_timezone_info", "arguments": {"timezone": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/world-time/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'timezone': 'example'}, 'name': 'get_timezone_info'}},
)
print(resp.json())

list_timezones

List available IANA timezone names, optionally filtered by region. Args: region: Optional region prefix to filter by (e.g. "Europe", "America", "Asia"). If omitted, returns all timezones.

ParameterTypeRequiredDescription
regionanyoptional
curl -X POST "https://context.gnist.ai/mcp/world-time/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_timezones", "arguments": {"region": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/world-time/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'region': 'example'}, 'name': 'list_timezones'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/world-time/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/world-time/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

Common Patterns

Search then retrieve
Use list_timezones to find items, then get_current_time to get full details. This two-step pattern is common for exploring data before drilling down.

FAQ

What data does World Time provide?

Current time, timezone conversions, and timezone information using the IANA tz database. It exposes 5 tools: get_current_time, convert_time, get_timezone_info, list_timezones, report_feedback.

Does this toolkit require external data?

No. It performs computations on your inputs directly. You only need a Gnist API key.

What format does the World Time API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials