Hacker News new | ask | show | jobs
by bloak 2043 days ago
People who can't cope with leap seconds should stop pestering the people who define UTC and just switch to TAI. They can do that now. No one is stopping them. Leap seconds are a pain and I myself would happily choose TAI over UTC for the system clock on a typical embedded system.

However, for civil time keeping and for some technical purposes, UTC as currently defined is exactly what we need. Don't fuck with it.

2 comments

No, they can't.

Programmers have to deal with the outside world. The outside world has timezones defined as offsets from UTC. So when UTC changes, the whole world changes their clocks, and programmers have to cope. If your program doesn't agree with that world about what time it is, your program will get blamed.

If it was a choice that I could individually make, I would tell astronomers to go pound sand. But it isn't. By historical happenstance, they have been put in charge of time, and it is truly a question of the tail wagging the dog when they care about a 1 second deviation between UTC and the position of the sun at a particular longitude.

Why not derive UTC from TAI (via a table of leap seconds)? Then apply the TZ rules to DST to arrive at local time.
The short answer is that I don't do this because I'm not insane.

Think about it. How much software would I have to rewrite to make this possible? What value does that rewrite create? And will maintenance programmers thank me for it? Will it get adopted?

As a programmer I have to interact with databases, operating systems, various libraries in various languages, and so on. Frequently with quick switching between them. ALL are written assuming UTC. Shall I name myself Don Quixote and spend the rest of my life on a rewrite that nobody wants to us?

Just to give a sense, I recently had to do some data science tasks. Data was in Postgres, my code was in Python, using pandas for speed, and pandas is built on numpy. All four of those have their own datetime library, and I had to deal with all four of them. If I followed your suggestion, before I did any work I'd have to rewrite all 4 libraries, and then figure out how to replace Amazon RDS because it doesn't support my "improved Postgres".

And if I did all of that, I've not changed the odds of something like https://www.wired.com/2012/07/leap-second-glitch-explained/ happening again and taking down my favorite websites for a while. Because guess what, they won't be running my super-duper rewritten code.

I feel the solution is for the programming community to slowly and methodically move towards using TAI in basic infrastructure (operating systems, routers, NTP etc) and build a base on which to derive the civil timekeeping (UTC + localtime, DST etc).

That, or get involved in the standards work. That said, after ruining observations by sending a bunch of satellites into space, tech people might be even less popular than before in the astro community...

Edit I just got around to reading that Wired article and... ugh

> Reddit was just one of several web outfits that were hit by leap second glitches just after midnight Greenwich Mean Time on Saturday,

Article is from Jul 2012, GMT was not in effect at that time. I guess they meant UTC, but if tech journalists don't know that GMT is depreciated as a concept of "universal time" what hope is there for meaningful time reform...

Do you have any idea how much work it is to rewrite all of that software?

The solution people are actually moving to is https://developers.google.com/time/smear. The downside is that measurements of elapsed time will be off in that day. But no rewrite needed, and most applications are going to be just fine with that.

Article is from Jul 2012, GMT was not in effect at that time. I guess they meant UTC, but if tech journalists don't know that GMT is depreciated as a concept of "universal time" what hope is there for meaningful time reform...

Timezones may have multiple names. Greenwich Mean Time and Zulu, aka GMT and Z, are officially defined timezones that happen to be UTC+0. Both are in widespread use and are not wrong.

There’s an ambiguity in that GMT is a civil timezone that in the UK is BST when DST is in effect. UTC cannot be affected by DST.

I hear a lot of Brits calling their time “GMT” even when DST is in effect. It’s a shorthand for “current time in the UK”. Hence, ambiguous.

> However, for civil time keeping and for some technical purposes, UTC as currently defined is exactly what we need. Don't fuck with it.

You are asserting that without any justification. I see no benefits and lots of downsides in having leap seconds in civil time specifically.

I think that the point is that for most definitions of "civil timekeeping" you just do what Unix does and ignore the leap seconds altogether and simply live with the fact that once in a while one wall-clock second takes two SI seconds (or does not exist at all), probably by simply being completely oblivious to that fact.
Don't even get me started on UNIX time. On that I agree with the parent comment, whatever the time scale, you shouldn't fuck with it. Alas, UNIX is what it is..