Converts Unix timestamps to human-readable datetime strings with timezone support. Use via MCP in Cursor or Windsurf, or call GET /v1/time/unix-to-datetime directly. Pass timestamp 1640995200 to get "2022-01-01 00:00:00 UTC". Handles millisecond precision and custom timezone formatting for reliable datetime operations in AI workflows.
curl "https://tinyfn.io/v1/time/unix-to-datetime" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/time/unix-to-datetime', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/time/unix-to-datetime',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's time/timezone tools:
{
"mcpServers": {
"tinyfn-time": {
"url": "https://tinyfn.io/mcp/time",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Call the unix-to-datetime tool with your timestamp. It returns formatted datetime strings with timezone info, perfect for AI agents processing time-based data.
Unix timestamps are typically 10 digits (seconds since 1970) or 13 digits (milliseconds). The tool auto-detects format and converts appropriately.
Yes, pass timezone parameter to get results in specific zones like 'America/New_York' or 'Europe/London' instead of default UTC.
Returns ISO 8601 format by default (YYYY-MM-DD HH:MM:SS TZ), but supports custom formatting patterns for different output requirements.
The tool validates timestamp ranges and returns errors for invalid values. Future timestamps work fine, but check for reasonable date bounds in your application.
Get your free API key and start using Unix To Datetime in seconds.
Get Free API Key