Date/Time Utilities

Convert Timestamp Ms

Converts Unix timestamps in milliseconds to human-readable dates and times. Access via MCP in Cursor, Claude Code, and other AI editors, or call GET /v1/datetime/timestamp-ms directly. Pass a millisecond timestamp like 1640995200000 to get "2022-01-01T00:00:00.000Z". Returns deterministic ISO 8601 formatted dates with timezone support.

API Endpoint

GET /v1/datetime/timestamp-ms

Code Examples

curl "https://tinyfn.io/v1/datetime/timestamp-ms" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/datetime/timestamp-ms', {
  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/timestamp-ms',
    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 date/time tools:

{
  "mcpServers": {
    "tinyfn-datetime": {
      "url": "https://tinyfn.io/mcp/datetime",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I convert a JavaScript Date.now() timestamp to readable format?

Pass the millisecond timestamp to this tool. JavaScript's Date.now() returns milliseconds since Unix epoch, which this function converts to ISO 8601 format like '2024-03-15T14:30:45.123Z'.

What's the difference between Unix timestamp seconds and milliseconds?

Unix timestamps are traditionally in seconds since 1970-01-01. This tool specifically handles millisecond timestamps (13 digits), which are 1000x larger than second timestamps (10 digits).

Can MCP tools in Windsurf convert timestamps from API responses automatically?

Yes, when your AI agent receives millisecond timestamps from APIs, it can use this MCP tool to convert them to readable dates for analysis or display without manual calculation.

What timezone does the converted timestamp use?

Returns UTC time in ISO 8601 format. The timestamp represents a specific moment in time, so timezone conversion happens during display, not during this conversion step.

How do I handle invalid or out-of-range timestamp values?

The tool validates input ranges. Extremely large or negative values that don't represent valid dates will return an error rather than attempting invalid date calculations.

Try Convert Timestamp Ms Now

Get your free API key and start using Convert Timestamp Ms in seconds.

Get Free API Key