time_tool
Convert and format timestamps, manage timezones, and retrieve current time in ISO, local, or custom formats. Ideal for time-based data processing and synchronization tasks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Time format (iso, timestamp, local, custom) | |
| pattern | No | Custom format pattern (required if format=custom) | |
| targetTimezone | No | Target timezone for timestamp conversion (e.g., America/New_York) | |
| timestamp | No | Timestamp to convert | |
| timezone | No | Timezone (e.g., Asia/Shanghai) |
Input Schema (JSON Schema)
{
"description": "Get current time",
"name": "time_tool",
"properties": {
"format": {
"description": "Time format (iso, timestamp, local, custom)",
"enum": [
"iso",
"timestamp",
"local",
"custom"
],
"type": "string"
},
"pattern": {
"description": "Custom format pattern (required if format=custom)",
"type": "string"
},
"targetTimezone": {
"description": "Target timezone for timestamp conversion (e.g., America/New_York)",
"type": "string"
},
"timestamp": {
"description": "Timestamp to convert",
"type": "number"
},
"timezone": {
"description": "Timezone (e.g., Asia/Shanghai)",
"type": "string"
}
},
"required": [],
"type": "object"
}