time

Parse a timestamp or date string into canonical forms...

Parse a timestamp or date string into canonical forms — zero-dependency. Accepts unix seconds/millis or any standard date string (ISO-8601, RFC-2822, etc.). Returns UTC ISO, unix seconds + millis, RFC-2822, calendar components (year/month/day/hour/minute/second/weekday), ISO weekday, ISO year+week, and day-of-year. Pass an IANA timezone (tz) to also get the DST-correct local wall-clock time and UTC offset. The reliable time primitive for agents normalizing or converting timestamps.

get/api/time/parse

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/time/parse
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

inputstring required

Timestamp or date string, e.g. "2026-06-21T15:30:00Z" or 1750000000.

tzstring

Optional IANA timezone for local conversion, e.g. America/New_York.

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.