I've been doing work on precision timekeeping on computer systems. Naturally I don't use timezones at all inside that code, but there are places where I need to apply timezones when presenting a time to non-specialist humans. Looking through the zoneinfo database and the theory written about it, it struck me that although it deals fantastically with what time offset to use, there's no rigorous treatment of what base time scale to apply the offset to. Then it struck me that a simple treatment of this could solve a couple of other issues with the database. An example of this issue: as the zoneinfo source notes, UK legal time is currently based on mean solar time on the Greenwich meridian. Now that's not even Universal Time any more, since the prime meridian moved (slightly) off the Greenwich meridian. But everyone in the UK in practice sets their clocks based on UTC, as promulgated by the NPL and the BBC. At centisecond timescales, GMT (legal time in the UK), UTC (used in practice), UT1 (which UTC tracks in the long term), and UT2 (used for civil time in the 1950s) are all quite distinct. So I have a suggestion: it would be nice if the zoneinfo database included a field identifying exactly which time scale to apply the offsets to. The database doesn't need to understand how the time scales relate to each other; leave that to the precision horologists. All it needs is a short text string, with values such as "UTC", "UT1", "GMT". Of course, in a lot of cases this information is unavailable, or the distinction wasn't being made, so you'd then give "UT" to be explicitly ambiguous about the exact flavour of Universal Time. This field would also allow the database to handle timezones that are based on something other than UT. Currently the data files for Saudi Arabia attempt to describe apparent solar time in terms of UT, by means of a daily offset change. But it could instead be specified as a fixed offset with a base of apparent solar time on the prime meridian. To understand the zone properly the code would need to calculate the equation of time, but that only needs to be implemented once and it would give a much smoother and more accurate result than the daily UT offset changes do. A system that doesn't do the equation of time would effectively fall back to mean solar time, which is what the Riyadh8X zones do anyway. It's also a way to handle Mars time. Just specify the base to be MTC instead of UT. Ta da. What do you think? -zefram
participants (1)
-
Zefram