Hacker News new | ask | show | jobs
by gerikson 2042 days ago
Why not derive UTC from TAI (via a table of leap seconds)? Then apply the TZ rules to DST to arrive at local time.
1 comments

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.