Adds specified time intervals (seconds, minutes, hours, days, etc.) to any datetime input. Use via MCP in Cursor or Windsurf for schedule calculations, or call GET /v1/time/add with datetime and interval parameters. Returns ISO 8601 formatted results. Handles timezone-aware operations and leap years correctly.
curl "https://tinyfn.io/v1/time/add" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/time/add', {
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/add',
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"
}
}
}
}
Pass your datetime and specify hours=3, minutes=30 as parameters. The tool accepts multiple time units simultaneously and returns the calculated result in ISO format.
Yes, it preserves the original timezone and accounts for DST transitions. If you add time that crosses a DST boundary, the result reflects the correct local time.
Yes, negative values work for any time unit (days=-1, hours=-2). This makes it versatile for both forward and backward time calculations.
AI agents in Cursor or Cline can call this tool to calculate project deadlines, meeting times, or SLA expiration dates without manual date arithmetic errors.
Supports years, months, weeks, days, hours, minutes, seconds, and milliseconds. You can combine multiple units in a single operation for complex time adjustments.