Skip to content
    Endpoint guide

    Get current time

    GET /v1/time/currentOpenAPI YAML

    Resolve the precise current time for any timezone, IP, coordinate or UTC offset.

    What do I need to send?

    Required / choose this first

    Choose one target selector: tz, ip, lat + lon, offset, or auto_tz. Omit the selector to use UTC.

    Optional

    format adds a formatted display value. sign adds verification headers.

    Rule: Bulk requests use one comma-separated tz, ip, or offset value. Do not mix selector families.

    NameNeeded?Use it for
    tzChoose one targetIANA timezone, e.g. Europe/Paris. Comma-separated values enable bulk mode.
    ipChoose one targetIPv4 or IPv6 address (resolved via GeoLite2). Comma-separated for bulk.
    latPair parameterLatitude in decimal degrees. Pair with lon.
    lonPair parameterLongitude in decimal degrees. Pair with lat.
    offsetChoose one targetFixed UTC offset, URL-encoded e.g. %2B02:00 for +02:00. Comma-separated for bulk.
    auto_tzChoose one targetSet true to use the request IP's timezone from Cloudflare metadata.
    formatOptionalstrftime pattern for an additional `formatted` field, e.g. %Y-%m-%d %H:%M:%S.
    signOptionalSet true to receive a signed response (Ed25519 headers).

    Code samples

    Copy a request in your preferred language and replace YOUR_TIMELOGIC_API_KEY with your direct API key.

    curl "https://api.timelogicapi.com/v1/time/current?tz=Europe/Paris" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"

    Example response

    {
      "unix": 1778093048,
      "unix_ms": 1778093048881,
      "utc": "2026-05-06T18:44:08Z",
      "iso_local": "2026-05-06T20:44:08+02:00",
      "rfc2822": "Wed, 06 May 2026 20:44:08 +0200",
      "human": "May 6, 2026, 8:44 PM Europe/Paris",
      "day_number": 4,
      "day_short": "Wed",
      "day_full": "Wednesday",
      "timezone": "Europe/Paris"
    }
    
    Additional endpoint notes

    Use at most one selector family (tz, ip, lat+lon, or offset) per request. If no selector is provided, the response defaults to UTC. Mixing selector families returns 400 AMBIGUOUS_TARGET.

    curl "https://api.timelogicapi.com/v1/time/current?tz=Europe/Paris" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY" 
    

    Bulk mode — pass a comma-separated list to one selector to receive an array, in input order:

    GET /v1/time/current?tz=Europe/Paris,Asia/Tokyo,America/New_York

    Common errors

    • 400 INVALID_PARAMETER — invalid IANA timezone (e.g. tz=Not/AZone) or malformed offset. Use %2B to URL-encode +.
    • 400 AMBIGUOUS_TARGET — multiple selector families in the same request.

    When to use this endpoint

    Use Get current time when an application needs a canonical "now" value for a single place or for a batch of places. It is the best fit for dashboards, scheduling previews, user profile defaults, countdowns, and systems that need a server-side timestamp rather than a browser clock.

    Request model

    Choose one selector family per request: tz, ip, lat + lon, or offset. Bulk requests use a comma-separated list inside the same family, which keeps validation predictable and preserves the response order for the caller.

    Response notes

    The response includes Unix seconds, Unix milliseconds, UTC, local ISO 8601, RFC 2822, human-readable text, day fields, and the resolved timezone. Prefer unix_ms for ordering events and iso_local for display.