Time/Timezone Utilities

Current Time

Returns current time in any timezone with precise formatting. Call via MCP in Cursor or Windsurf, or hit GET /v1/time/now directly. Specify timezone like "America/New_York" or "UTC" to get ISO 8601 timestamps. Essential for AI agents handling time-sensitive operations across regions without timezone calculation errors.

API Endpoint

GET /v1/time/now

Code Examples

curl "https://tinyfn.io/v1/time/now" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/time/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/time/now',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

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"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I get current time in a specific timezone using MCP?

Call the current_time tool with timezone parameter like 'America/Los_Angeles' or 'Europe/London'. Returns ISO 8601 formatted timestamp for that region.

What timezone format does the current time API accept?

Uses IANA timezone identifiers like 'America/New_York', 'Asia/Tokyo', or 'UTC'. Full list available at IANA timezone database.

Does the current time tool handle daylight saving time automatically?

Yes, automatically accounts for DST transitions. A request for 'America/New_York' returns EST or EDT depending on current date.

Can I get current time in multiple timezones with one MCP call?

No, each call returns one timezone. Make separate calls for multiple regions, or use the batch time comparison tools for efficiency.

What's the difference between this and JavaScript's Date.now()?

This provides server-side timezone conversion with guaranteed accuracy. Client-side Date.now() depends on user's system timezone settings which may be incorrect.

Try Current Time Now

Get your free API key and start using Current Time in seconds.

Get Free API Key