Convert Time API
IANA zones
DST-aware
Geocoded

Time zone conversion.From any input format.

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.

600+ · IANA zones3 · input formatsDST · auto-handledGeoNames · location DB

Why Convert Time API

Time zones, without the headaches.

Every IANA Zone
Backed by moment-timezone. Convert between any two of the 600+ IANA identifiers without maintaining your own table.
DST-Aware Math
Daylight saving transitions are handled per-zone. Offsets reflect the date you pass in, not today.
Geocoded Locations
Skip the IANA lookup. Pass `New York, NY` or `Tokyo, Japan` and the API resolves it to the correct zone via GeoNames data.
Flexible Input
Accept ISO 8601 strings, epoch seconds, or epoch milliseconds. Mix zones and locations on source and target.
Coordinates Returned
Every response includes latitude and longitude for the resolved location — handy for maps and downstream geo workflows.
Simple to Integrate
Pure GET requests with query-string auth. No JSON body, no SDK — works from a browser, curl, or any HTTP client.

/api/v1/convert-time

Endpoints, at a glance.

One conversion route, one current-time route, and standard ops endpoints. Every route is GET with query-string auth.
GET/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.

PRIMARY
GET/current-time

Current time lookup

Return the current local time for a zone or geocoded location with DST status and coordinates.

GET/health

Service health

Status, version, and timestamp. Root / redirects here.

GET/metrics

Prometheus metrics

Conversion counts, processing durations, and database query performance.

ParameterTypeRequiredDescription
sourceTimestringyesTime to convert. ISO 8601, epoch seconds, or epoch milliseconds.
sourceZonestringeither*Source IANA timezone (e.g. America/New_York).
sourceLocationstringeither*Source location for geocoded lookup (e.g. New York, NY).
targetZonestringeither*Target IANA timezone (e.g. Asia/Tokyo).
targetLocationstringeither*Target location for geocoded lookup.
api_keystringyesAPI key via query string. Alternatively pass as x-api-key header.

*Either sourceZone or sourceLocation must be provided, and either targetZone or targetLocation.

Requests & responses.

All GET. Pass zones, locations, or both — the API resolves what it can and returns a clean JSON payload.

Convert between zones
ISO timestamp + two IANA zones. DST baked in.
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
By location & current time
Pass place names instead of IANA strings, or ask for `now`.
GET https://datpaq.com/api/v1/convert-time?api_key=YOUR_API_KEY\
  &sourceTime=1672574400\
  &sourceLocation=New York, NY\
  &targetLocation=Tokyo, Japan
Health
https://datpaq.com/api/v1/convert-time/health
Metrics
https://datpaq.com/api/v1/convert-time/metrics

Error reference

Predictable errors, always structured.

Every error response includes a correlationId for request tracing and a clear error message.

400Missing Parameters
Required parameters not provided. Include sourceTime plus one of sourceZone/sourceLocation and one of targetZone/targetLocation.
400Invalid Timezone
Zone identifier not recognized by moment-timezone. Must match the IANA database.
400Invalid Time Format
sourceTime not in a supported format. Use ISO 8601, epoch seconds, or epoch milliseconds.
401Unauthorized
API key missing or invalid. Pass api_key as a query param or x-api-key as a header.
404Location Not Found
Geographic location not found in the GeoNames-backed database. Try a more specific query.
500Processing Error
Internal conversion or database error. The correlationId in the response helps with debugging.
Example error response
{
  "success": false,
  "error": "Missing or invalid time zone or location inputs.",
  "meta": {
    "correlationId": "stu901-vwx234",
    "timestamp": "2026-04-06T10:30:00.000Z"
  }
}

FAQ

API questions developers ask first.

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.

Is there a free tier?

Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.

What format do requests and responses use?

Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.

Where can I see limits and errors?

Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.

Convert time, in one GET.

Pass a moment, a source zone or location, and a target - get the converted time with offsets and coordinates.