Fortunately, the technology for keeping planes airborne receive more attention that the information systems for passengers.

In October I went to ElixirConf to talk about time and timezones. One of the things I talked about was keeping timezone data up to date.

A good example of that showed itself soon after: On the plane going back it had one of those screens showing the local time at the destination. It was incorrect.

Event reminding software feature causes area man to miss event

About a week later I was playing a 8-a-side football game. But a player had not shown up. As the game was about to end, he showed up, confused. Why? Because of the way timezone data updates are handled. It is a broken system. The event was arranged with Facebook. Facebook’s timezone data is out of date. So Facebook told the player that the game started at 9pm instead of 8pm.

A more simple approach such as the local time written on paper, sent with Fax or a text message would not have caused such as problem. But like so many other pieces of software, the Facebook code is “clever” and uses timezone conversions. Facebook thinks it knows where you are and what time it is in that location. When it works, this cleverness can be helpful. But this time it was wrong. When you write code that is clever like that, you have to make sure that the timezone information is up to date. Otherwise it does not work and people get upset.

It is a common problem

Facebook and Boeing airplanes are not alone in having out of date timezone information. The same goes for all the major operating systems such as Windows, Linux, Mac OS X. And many phones too. And telecom providers. In my experience most systems with timezone information are often out of date.

The company in the world with the largest market capitalisation (Apple) has this problem. So has number 8 (Facebook). And they are both tech companies. I think it is an interesting phenomenon. And they are not the only ones with that problem.

It is important

In this case the Facebook event feature failed pretty spectacularly. It reminds me of those photos with the caption “you had one job”. Facebook events are supposed to tell people about an event and when it takes place. It failed in this case. Because of out of date timezone data.

It is not super hard to get up to date data

The timezone data is freely available at IANA’s website. You do not have to pay for it, anyone can download it and use it.

Why has it not been fixed?

Why is it that some of the most valueable companies in the world, and tech companies at that, cannot cope with the challenge of having up to date timezone data?

Remember when people thought that it was a good idea to only save the two last digits of a year? 90 instead of 1990. In my experience many programmers just do whatever everyone else is doing. Unless it is an area they care about. And most programmers do not care about timezone updates. Unless they personally experience problems caused by it.

What people do today

Very few people seem to take responsibility for having up-to-date timezone data, having a process for it or even caring much about it.

In Linux the common way to update timezone data is using software package updates. There is a package called tzdata that contains both the data and code at the same time. There are several problems with this. One is that it takes a while from IANA releasing new data to someone manually make a new package version with the new data. Sometimes an update will be release by IANA, and no packages are ever made! So even if users update their system with the newest packages the moment they come out, they will be old.

A second issue is that these updates are viewed the same way as other software updates. Like a new version of database software. And in order to avoid regressions, developers/sysadmins will usually have to spend precious time testing things before upgrading software. It takes time and is seen as a barrier to upgrade software running on a server. How ever small that costs is, it is there.

So the state of timezone updates today for most people is that it relies on two sets of people that have to manually do something. If just one of them fail to do that, the result is the timezone data is out of date. And right now the common thing is for both sets of people to not do it or do it slowly.

It is just updated data, not a new API or different functionality

But the data itself is not new software. It is just data. Functionality should not change because of new data. New timezone data could be seen similarly to setting the clock of the server. This is commonly done automatically. Or it could be seen as data in a database changing. If you change software, you have to test it to see if it still works as required. But when a system is running and data is changed in a database due to normal use, the software is not tested every single time a row is changed, inserted or updated. That would be silly. Because the software should be made to handle different kinds of data.

It should be possible to automatically update the timezone data without having to treat it with the same ceremony as with a software update.

A solution

Imagine if this problem was something that could be handled automatically by software. It turns out that that is in fact the case! Tzdata for Elixir checks the IANA servers once a day. If there is a new version of the timezone database available, it will be automatically downloaded and updated. The future is here, but in this case only distributed to Elixir ;-)

The exception to the rule. Offline embedded systems

Not all systems are connected to the internet. In that case you cannot do to updates automatically in the same way. But it needs to happen somehow in order to have timezone based calculations be correct.

If you make a system that uses timezone data, think ahead. The timezone data is updated as often as 10 times a year or more. In case you have an embedded system that is not connected to the internet all the time, how can that processes be put in place to make sure it is updated?

What to do if you do not use Elixir

If your system is on the Internet, but rely on timezone updates that are not from Elixir, what can you do to improve the situation? One solution would be to implement a similar automatic system that updates automatically using the Internet.

Another would be for package maintainers to have an improved process for manually releasing data just after it is released. I do not have high hopes for this to happen, but maybe someone reading this could help maintain packages and implement a process to make it more quick and consistent.

The second part is for users of those packages to have a process for making sure the data is updated as it become available. Someone needs to be responsible for it and make sure the data is updated when it is available.

Computer professionals relying on manual processes for something that is perfect for computers

Not all things are easy to automate using computers. But this is. It is funny how people who make software to help automate things for someone else, themselves do things manually when it comes to timezone updates. The current system does not work well. It is time to move on to an automated system.