1 Time Scale
Gregor assumes that all days have exactly 86,400 seconds. Therefore, it is based fundamentally
on mean solar time, or Univeral Time,
and not on
Coordinated Universal Time (UTC),
the civil time scale adopted by most of the world. In the interest of reconciling the SI second
to a close approximation of mean solar time, UTC occasionally inserts an extra leap second
into a day.
UTC can also remove seconds but has never done so. The rotation of the Earth is slowing and solar days are getting longer, so there has only ever been a need to add seconds.
Since leap seconds are added on an irregular basis, they complicate both the representation of times
and arithemtic performed on them. In practice, most computer systems are not faithful to UTC. The POSIX
clock, for example, ignores leap seconds. The standard (and non-standard) date and time libraries of
most programming languagues also ignore them. In truth, although UTC is the de jure
international standard, it’s rare to find a system that actually implements it and just as rare to find
a user who misses it.
That said, if there is a demand for proper UTC support, I will consider adding it. Ideally, Gregor would be able to support many different time scales. API suggestions are welcome.