... & a routine for parsing the UTC leapseconds file.
But mostly Hare's `time::chrono` standard library supplies that `timescale` type holding a name, abbrevation, & conversion callbacks.
It has a routine for iterating over the given timescales & converting converting an argument to it, trying multiple conversion callbacks.
There's timescales defined for TAI (no leapseconds), UTC (has leapseconds, GPS (different epoch than UNIX), Teresstrial Time (different epoch), ...
3/4!!
... & Coordinated Mars Time (rescaled with offsets).
To handle Leap Seconds it reads in the file if needed, compares against the 1st leap-second, iterates backwards over the leapseconds array looking for the relevant entry, & adds/subtracts it. And there's a very similar inverse routine.
3.5/3.5 Fin for today! Tomorrow: The `time::date` sublibrary!