convert_timezone
Convert datetime between timezones using IANA names, with DST-aware adjustments. Get the converted local time, UTC offset, and DST status.
Instructions
Convert a datetime from one timezone to another (DST-aware).
Uses Python's built-in IANA timezone database. No external API needed.
Args: datetime: ISO 8601 datetime string (e.g. "2024-06-15T14:30:00") from_tz: IANA source timezone (e.g. "America/New_York", "UTC") to_tz: IANA target timezone (e.g. "Asia/Tokyo", "Europe/Berlin")
Returns: dict with keys: result, result_date, result_time, utc_offset, is_dst, cost_usd
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"datetime": "<datetime>",
"from_tz": "<from_tz>",
"to_tz": "<to_tz>"
},
"name": "convert_timezone"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_tz | Yes | ||
| from_tz | Yes | ||
| datetime | Yes |