4 ms·
Unsmear: Convert to and from timescales with smeared leap seconds
- brandmeyer 7y ago(Dustin Hoffman's voice) I hate, I Hate, I HATE Smeared Time! I must admit my own personal bias in this matter, because I am in the process of implementing a GNSS receiver that very much cares about both the speed and phase of time. It seems that the computing industry would rather define the second based the mean solar day of Earth's rotations, despite the rest of the world defining it to be the number of shakes of a Cesium atom partway down Earth's gravity well. But instead of slaving their clocks to the international system that actually measures the mean solar day (UT1R), they decided to muck with both the speed and phase of time. For just one 24 hour period. Every once in a while. If I was king for a moment, and could pronounce just one edict it would be this: To transmit UT1R's offset in the GPS C/NAV message, and demand that the NTP timebase slaves itself to that.
- detaro 7y agoTime smearing is far from a "computing industry" standard. Has its use spread that far past Google and stuff running on their services?
- brandmeyer 7y agoAWS does it: https://aws.amazon.com/about-aws/whats-new/2017/11/introducing-the-amazon-time-sync-service/ https://aws.amazon.com/about-aws/whats-new/2017/11/introduci... NTP can be configured to do it: https://docs.ntpsec.org/latest/leapsmear.html https://docs.ntpsec.org/latest/leapsmear.html Support for this is growing more popular with time, rather than less.
- AstralStorm 7y agoThis is because the "cure" of a leap second is worse than disease. How about we use actual correct seconds instead and get rid of the whole business?
- steerablesafe 7y agoI would be happy if computer clocks wouldn't be changed on leap seconds, just stick to TAI instead of UTC. We don't reset clocks/dates on DST and leap days, so why do we bother with leap seconds?
- gerikson 7y ago> We don't reset clocks/dates on DST We don't?
- steerablesafe 7y agoWell, not computer clocks, they just run on UTC. Displayed clocks are adjusted with the appropriate time zone selected for them.
- deleted 7y ago[deleted]
- gerikson 7y agoThanks for clarifying!
- wbl 7y agoBlame ITU.
- perilunar 7y ago> despite the rest of the world defining it to be the number of shakes of a Cesium atom partway down Earth's gravity well. Hang on, the number of shakes should be the same regardless of where you are in a gravitational well.
- whatshisface 7y agoThe rate of shaking would appear to be different due to general relativity.
- brandmeyer 7y agoThe timebases which are transmitted by the GNSS systems are in turn synchronized to the TAI network, which are all located on Earth's surface. Time does appear to be passing noticeably slower on Earth's surface compared to precision clocks in orbit. Even on the surface if you measure very carefully, you'll find that the SI second varies with respect to TAI depending on your altitude above mean sea level, too. Civil time is therefore already partly divorced from the SI second due to this effect. Why not divorce it the rest of the way?
- perilunar 7y agoI'm not disputing that clocks at altitude appear to run faster relative to clocks at sea level - as you said time is passing slower down here. But a second is always and everywhere the same 'number of shakes' locally.
- dmurray 7y agoIf you hate smearing, and it causes problems for you, then you're likely exactly the person this library is for.
- wmf 7y agoOh man, I thought the point of smearing is to avoid the need for such conversions.
- tedunangst 7y agoSmearing is very convenient if you use it because time stays "normal". But if you need to precisely correlate with outside sources, what other option do you have?
- wmf 7y agoSo when do you need subsecond-acccurate correlation of timestamps with outside sources?
- brandmeyer 7y agoMy ground control systems are sitting in a hosted datacenter with an entirely-unlike-UTC timebase. My satellite is synchronized to TAI via GPS time. I coordinate with a third party who manages the ground-based radio to coordinate contacts with my satellite system. If something goes wrong, it would be nice to compare the logs from the three systems after a contact to see which node thought what was going on. The fact that one or two of those systems gets its time from a not-UTC source makes this problem harder than it needs to be.
- 1-6 7y agoEntering "2016-12-31 23:59:60" in a POSIX converter will fail and XML will reject such entry as "invalid time".
- est31 7y ago> Although this is not an officially supported Google product, you can reach us on the unsmear-discuss mailing list. I'd say that this component has probably much better support than any of those "officially supported" Google products. Not wanting to blame Google for this though, they have billions of customers and providing good customer support for them would be insanely expensive.
- zokier 7y agoWhy were leap seconds (basically utc vs tai) accepted so readily and widely? What does it matter if civil vs solar time would have slowly drifted 10 minutes over a millenia or something like that?
- AstralStorm 7y agoAlmost every device would be inaccurate and impossible to synchronize with military standards, causing huge headaches in defense industry. Why not instead use a correct second?
- steerablesafe 7y agoGPS time has no leap seconds though.