timestamp_convert
Convert Unix timestamps to ISO 8601 dates or date strings to Unix seconds. Auto-detects input type for bidirectional conversion.
Instructions
Convert between Unix timestamps (seconds) and ISO 8601 date strings. Auto-detects direction: numbers → ISO, date strings → Unix seconds. Accepts Unix in seconds or milliseconds (auto-detected). Use when you need to convert epoch values to human-readable dates or vice-versa.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The value to convert. Either a Unix timestamp (as a number or numeric string, seconds or ms) or an ISO/date string like "2024-01-15T10:30:00Z". | |
| to | No | "iso" to force output as ISO 8601, "unix" to force output as Unix seconds. Omit to auto-detect. |