apyhub
GEOLOCATION · STANDARD DATA

Get Current Time API

What it does

Current Time returns the current date and time as an ISO string plus a Unix timestamp. Send an optional tz query parameter to get the values for a specific time zone; if you omit it, the service uses UTC.

Use Current Time when you need a consistent server-side clock in your app, job runner, or integration. It is useful for stamping events, scheduling tasks, comparing timestamps, and normalising time values across services without relying on a client device’s local clock.

The response includes tz, iso, and unix. iso gives you the current date-time in a standard string format, while unix gives you the same moment as an integer timestamp. That makes it easy to store, display, or pass the value into downstream systems that expect either human-readable or machine-friendly time data.

If your workflow needs a simple way to read the current time in a known zone, Current Time keeps the response minimal and predictable.

GET
Current date and time as ISO string and Unix timestamp
http://localhost:8080/dosvak/date-now
QUICKSTARTGUIDE

Quickstart

Get the current date and time for a timezone by passing the tz query parameter.

curl -X GET "http://localhost:8080/dosvak/date-now?tz=UTC" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with tz as a string, iso as a string, and unix as an integer.

{
  "tz": "UTC",
  "iso": "2026-07-23T12:34:56.789Z",
  "unix": 1784808896
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns the current date and time for the requested timezone as both an ISO string and a Unix timestamp.

Query Parameter(s)

AttributeTypeMandatoryDescription
tzStringNoTimezone to use for the current date/time calculation. Default: UTC.

Response

Returns a JSON object with tz, iso, and unix fields. tz is a string, iso is a string, and unix is an integer; these represent the timezone used, the current date/time in ISO format, and the current date/time as a Unix timestamp.

ParameterTypeMandatoryDescription
tzStringNoTimezone used to produce the date/time value.
isoStringNoCurrent date and time as an ISO string.
unixIntegerNoCurrent date and time as a Unix timestamp.

Query parameters

Name
Type
Description
tzOPTIONAL
string
DEFAULT UTC
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.