Seconds Between Dates
How many seconds between two instants?
The count that Unix time itself is measured in — an exact second difference between two instants, with the millisecond, microsecond and nanosecond totals beside it.
Questions people ask
The things that come up about seconds between datess, answered plainly.
Is this the same as subtracting two Unix timestamps?
Exactly the same. Unix time counts seconds since 1970 with no leap seconds in it, so the difference between two timestamps is the difference in seconds, with no calendar involved.
What about leap seconds?
Twenty-seven have been added to UTC since 1972, but Unix time skips them by design — the clock repeats a second rather than counting it. A second count from Unix timestamps is therefore short by up to 27 across the whole period, and exactly right for anything since 2017.
Related tools
How far apart two instants are — in whichever unit you need, counting every day or only the working ones.