# Unix Timestamp Converter API

> Unix Timestamp Converter converts Unix timestamps into formatted dates and parses ISO 8601 strings back into epoch seconds. Responses break down dates into ISO 8601, RFC 2822, simple time strings, individual calendar components like year, month and hour, plus the day of the year. Paid plans add the ISO week, and an IANA timezone to also get the same moment in local time with its UTC offset, abbreviation and daylight saving flag.

**Endpoint:** `GET https://api.apiverve.com/v1/unixtimestamp`  
**Category:** Data Conversion  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/unixtimestamp

## Overview

A unix timestamp conversion API and timestamp reader for logs, databases and other APIs. Unix Timestamp Converter works by converting Unix epoch timestamps to formatted dates or parsing date strings into Unix timestamps. Returns comprehensive date information including year, month, day, time components, day of year and multiple standard formats, and on paid plans the ISO week and, with a timezone parameter, the same instant as local time in any IANA zone, DST-aware.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/unixtimestamp?timestamp=1609459200&format=seconds&timezone=America%2FNew_York" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | string | Yes | Unix timestamp to convert. timestamp |
| `format` | string | No | Timestamp format. default seconds. One of: seconds, milliseconds, s, ms |
| `timezone` | string | No | IANA timezone (e.g. America/New_York) or a UTC/GMT-prefixed fixed offset (e.g. UTC+05:30) to also show the moment in, returned as a local block. timezone |

## Response fields

- `timestamp` — number · Unix timestamp in requested format
- `timestamp_format` — string · Format of the timestamp value returned
- `iso_8601` — string · Date formatted in ISO 8601 standard
- `rfc_2822` — string · Date formatted in RFC 2822 standard
- `date` — string · Date in simple M/D/YYYY format
- `time` — string · Time in HH:MM:SS AM/PM format
- `unix_seconds` — number · Unix timestamp in seconds
- `unix_milliseconds` — number · Unix timestamp in milliseconds · (premium)
- `year` — number · Year component extracted from timestamp
- `month` — number · Month component from 1 to 12
- `day` — number · Day of month component
- `hour` — number · Hour component in 24-hour format
- `minute` — number · Minute component of the time
- `second` — number · Second component of the time
- `day_of_week` — string · Full name of the day of week · (premium)
- `timezone` — string · Timezone of the returned date
- `day_of_year` — number · Day of the year in UTC, from 1 to 366
- `iso_week` — string · ISO 8601 week in UTC, e.g. 2020-W53 · (premium)
- `local` — object · The same moment in the requested timezone (only when timezone is given) · (premium)
  - `local.timezone` — string · Canonical IANA name or UTC offset used · (premium)
  - `local.iso_8601` — string · Local date and time in ISO 8601 with offset · (premium)
  - `local.date` — string · Local date in M/D/YYYY format · (premium)
  - `local.time` — string · Local time in h:mm:ss AM/PM format · (premium)
  - `local.year` — number · Local year · (premium)
  - `local.month` — number · Local month from 1 to 12 · (premium)
  - `local.day` — number · Local day of month · (premium)
  - `local.hour` — number · Local hour in 24-hour format · (premium)
  - `local.minute` — number · Local minute · (premium)
  - `local.second` — number · Local second · (premium)
  - `local.day_of_week` — string · Local day of the week · (premium)
  - `local.day_of_year` — number · Local day of the year · (premium)
  - `local.iso_week` — string · Local ISO 8601 week · (premium)
  - `local.utc_offset` — string · Offset from UTC at that moment, e.g. -05:00 · (premium)
  - `local.utc_offset_seconds` — number · Offset from UTC in seconds at that moment · (premium)
  - `local.abbreviation` — string · Zone abbreviation at that moment (e.g. EST); null for fixed offsets and zones with no letter abbreviation · (premium)
  - `local.is_dst` — boolean · Whether daylight saving time was in effect · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "timestamp": 1609459200,
    "timestamp_format": "seconds",
    "iso_8601": "2021-01-01T00:00:00.000Z",
    "rfc_2822": "Fri, 01 Jan 2021 00:00:00 GMT",
    "date": "1/1/2021",
    "time": "12:00:00 AM",
    "unix_seconds": 1609459200,
    "unix_milliseconds": 1609459200000,
    "year": 2021,
    "month": 1,
    "day": 1,
    "hour": 0,
    "minute": 0,
    "second": 0,
    "day_of_week": "Friday",
    "timezone": "UTC",
    "day_of_year": 1,
    "iso_week": "2020-W53",
    "local": {
      "timezone": "America/New_York",
      "iso_8601": "2020-12-31T19:00:00-05:00",
      "date": "12/31/2020",
      "time": "7:00:00 PM",
      "year": 2020,
      "month": 12,
      "day": 31,
      "hour": 19,
      "minute": 0,
      "second": 0,
      "day_of_week": "Thursday",
      "day_of_year": 366,
      "iso_week": "2020-W53",
      "utc_offset": "-05:00",
      "utc_offset_seconds": -18000,
      "abbreviation": "EST",
      "is_dst": false
    }
  }
}
```

## Use cases

- **API Development** — Convert timestamps from databases and APIs to human-readable dates for display in applications
- **Log Analysis** — Parse timestamps in log files and system events for debugging and monitoring
- **Data Migration** — Convert date formats between different systems and databases during data transfer
- **Time Synchronization** — Standardize time representations across distributed systems using epoch timestamps

## SDKs

- **npm** — `npm install @apiverve/unixtimestamp` (https://www.npmjs.com/package/@apiverve/unixtimestamp)
- **NuGet** — `dotnet add package APIVerve.API.UnixTimestampConverter` (https://www.nuget.org/packages/APIVerve.API.UnixTimestampConverter)
- **Source** — https://github.com/apiverve/unixtimestamp-api

## More

- Full reference: https://docs.apiverve.com/ref/unixtimestamp
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
