Returns the current UTC timestamp in ISO 8601 format. Access via MCP in Cursor or other AI editors, or call GET /v1/datetime/now directly. Perfect for logging, scheduling, or when AI agents need precise timing data. Always returns deterministic UTC time, eliminating timezone confusion in automated workflows.
curl "https://tinyfn.io/v1/datetime/now" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/datetime/now', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/datetime/now',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's date/time tools:
{
"mcpServers": {
"tinyfn-datetime": {
"url": "https://tinyfn.io/mcp/datetime",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Returns ISO 8601 UTC format like '2024-01-15T14:30:45.123Z'. This standardized format works across all programming languages and systems.
Just ask your AI assistant for the current time. The MCP tool automatically calls the endpoint and returns the precise UTC timestamp.
UTC eliminates timezone ambiguity in distributed systems. Convert to local time in your application using the returned UTC timestamp as the source of truth.
Yes, but each call returns the exact moment it's executed. For microsecond precision or batch operations, consider caching or generating multiple timestamps locally.
This provides server-side UTC time that's consistent across clients, while local functions return the client's system time which may be incorrect or in different timezones.