ISO date-time diff seconds
iso-datetime-diff-seconds · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed
Return the signed whole-second difference between two strict UTC ISO-8601 datetimes.
Use when you need to: iso datetime diff seconds · difference between utc datetimes in seconds · utc datetime difference in seconds.
Supported
- iso datetime diff seconds
- difference between utc datetimes in seconds
- utc datetime difference in seconds
Not supported
- leap seconds
- time zones
- offsets other than Z
- fractional seconds
- locale
- ISO-8601 duration strings
- calendar month or year difference
- DST
Behavior
- start and end must each 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.
- The result is the canonical integer string of end minus start in whole seconds on the UTC timeline.
- The difference is negative when end is earlier than start, and 0 when the instants are equal.
Input
start(string, required): min length 20; max length 20; pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$end(string, required): min length 20; max length 20; pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
Output
seconds(string, required): pattern^(0|-?[1-9][0-9]*)$
Limits
- min year: 1
- max year: 9999
Example
Request input:
{
"start": "2026-09-11T12:00:00Z",
"end": "2026-09-11T12:01:30Z"
}
Response:
{
"result": {
"seconds": "90"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "iso-datetime-diff-seconds",
"version": "1.0.0",
"input": {
"start": "2026-09-11T12:00:00Z",
"end": "2026-09-11T12:01:30Z"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/iso-datetime-diff-seconds/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"start":"2026-09-11T12:00:00Z","end":"2026-09-11T12:01:30Z"}'
The machine-readable contract is at /v1/tools/iso-datetime-diff-seconds/versions/1.0.0.
CLI
node cli.mjs run iso-datetime-diff-seconds 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- ISO date-time add seconds: Add a signed whole-second delta to a strict UTC ISO-8601 datetime.
- ISO date-time compare: Compare two strict UTC ISO-8601 datetimes and return -1, 0, or 1.
- ISO date age: Compute the calendar-aware elapsed years, months, and days between a birth date and an as-of date.
- ISO date difference: Whole days from start to end as a canonical integer string (end - start).
- ISO date range list: Enumerate the dates in an inclusive [start, end] range stepped by a whole number of days.
- ISO date weekday occurrences in range: List every date within an inclusive date range that falls on a given ISO weekday.