How do I authenticate with this API?
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Convert between IANA time zones or any geocoded location with full DST awareness. Accepts ISO 8601 strings, epoch seconds, or epoch milliseconds — returns coordinates and offsets in one clean GET.
Why Convert Time API
/api/v1/convert-time
Convert between zones
Convert a moment in time between two IANA zones or two locations. Mix and match zone/location on source and target.
Current time lookup
Return the current local time for a zone or geocoded location with DST status and coordinates.
Service health
Status, version, and timestamp. Root / redirects here.
Prometheus metrics
Conversion counts, processing durations, and database query performance.
| Parameter | Type | Required | Description |
|---|---|---|---|
| sourceTime | string | yes | Time to convert. ISO 8601, epoch seconds, or epoch milliseconds. |
| sourceZone | string | either* | Source IANA timezone (e.g. America/New_York). |
| sourceLocation | string | either* | Source location for geocoded lookup (e.g. New York, NY). |
| targetZone | string | either* | Target IANA timezone (e.g. Asia/Tokyo). |
| targetLocation | string | either* | Target location for geocoded lookup. |
| api_key | string | yes | API key via query string. Alternatively pass as x-api-key header. |
*Either sourceZone or sourceLocation must be provided, and either targetZone or targetLocation.
All GET. Pass zones, locations, or both — the API resolves what it can and returns a clean JSON payload.
GET https://datpaq.com/api/v1/convert-time?api_key=YOUR_API_KEY\ &sourceTime=2023-01-01T12:00:00\ &sourceZone=America/New_York\ &targetZone=Asia/Tokyo
GET https://datpaq.com/api/v1/convert-time?api_key=YOUR_API_KEY\ &sourceTime=1672574400\ &sourceLocation=New York, NY\ &targetLocation=Tokyo, Japan
Error reference
Every error response includes a correlationId for request tracing and a clear error message.
{
"success": false,
"error": "Missing or invalid time zone or location inputs.",
"meta": {
"correlationId": "stu901-vwx234",
"timestamp": "2026-04-06T10:30:00.000Z"
}
}FAQ
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.
Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.
Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.
Pass a moment, a source zone or location, and a target - get the converted time with offsets and coordinates.