Many standards and libraries allow for times like 23:59:60 to represent leap seconds, whenever should too. (Note that this is not the same as taking into account historical leap seconds, which almost no libraries or standards do)
Two approaches I can think of for this:
Allow 60 seconds when ingesting or parsing data, but constrain it to 59 in the actual class (this is what JS temporal does)
Representing leap seconds by allowing up to 2 seconds of micro/nanoseconds (this is what Chrono does)
Many standards and libraries allow for times like
23:59:60
to represent leap seconds, whenever should too. (Note that this is not the same as taking into account historical leap seconds, which almost no libraries or standards do)Two approaches I can think of for this: