# ISO date-time add seconds

`iso-datetime-add-seconds` · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed

Add a signed whole-second delta to a strict UTC ISO-8601 datetime.

**Use when you need to: iso datetime add seconds · add seconds to utc datetime · shift iso datetime by whole seconds.**

## Supported

- iso datetime add seconds
- add seconds to utc datetime
- shift iso datetime by whole seconds

## Not supported

- leap seconds
- time zones
- offsets other than Z
- fractional seconds
- locale
- ISO-8601 duration strings
- add months or years
- DST

## Behavior

- datetime must match YYYY-MM-DDTHH:MM:SSZ with zero-padded fields and a real proleptic Gregorian UTC civil time.
- Years are 0001-9999. Days are linear 86400-second POSIX days. There are no leap seconds, fractional seconds, space separators, or offsets other than Z.
- seconds is a canonical integer string; -0 is accepted as 0. The absolute value may have at most 12 digits excluding the sign.
- The delta is applied on the UTC millisecond timeline via Date.UTC / getUTC* (no local Date getters).
- The result is formatted YYYY-MM-DDTHH:MM:SSZ. If the result year is outside 0001-9999 the call is rejected.

## Input

- `datetime` (string, required): min length 20; max length 20; pattern `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$`
- `seconds` (string, required): max length 13; pattern `^-?(0|[1-9][0-9]*)$`

## Output

- `datetime` (string, required): min length 20; max length 20; pattern `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$`

## Limits

- max seconds digits: 12
- min year: 1
- max year: 9999

## Example

Request input:

```json
{
  "datetime": "2026-09-11T12:00:00Z",
  "seconds": "90"
}
```

Response:

```json
{
  "result": {
    "datetime": "2026-09-11T12:01:30Z"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "iso-datetime-add-seconds",
  "version": "1.0.0",
  "input": {
    "datetime": "2026-09-11T12:00:00Z",
    "seconds": "90"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/iso-datetime-add-seconds/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"datetime":"2026-09-11T12:00:00Z","seconds":"90"}'
```

The machine-readable contract is at [/v1/tools/iso-datetime-add-seconds/versions/1.0.0](/v1/tools/iso-datetime-add-seconds/versions/1.0.0).

### CLI

```sh
node cli.mjs run iso-datetime-add-seconds 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [ISO date add months](/tools/iso-date-add-months): Add a signed month count to a YYYY-MM-DD date, clamping the day to the target month.
- [ISO date add years](/tools/iso-date-add-years): Add a signed whole-year delta to a YYYY-MM-DD date, clamping the day if 29 February has no match.
- [ISO date-time clamp](/tools/iso-datetime-clamp): Clamp a strict UTC ISO-8601 datetime into an inclusive [min, max] range.
- [ISO date-time diff seconds](/tools/iso-datetime-diff-seconds): Return the signed whole-second difference between two strict UTC ISO-8601 datetimes.
- [ISO date-time truncate](/tools/iso-datetime-truncate): Truncate a strict UTC ISO-8601 datetime toward UTC zero at day, hour, minute, or second.
- [ISO date add](/tools/iso-date-add): Add a signed whole-day delta to a strict YYYY-MM-DD calendar date.
