Monday, November 20

The Database of the Time Lords

Time zones have been a necessity since humans could travel faster than a horse, but with computers, interconnected over a vast hive of information, a larger problem has emerged. How do you keep track of time zones? Moreover, how do you keep track of time zones throughout history?

Quick question. If it’s noon in Boston, what time is it in Phoenix? Well, Boston is in the Eastern time zone, there’s the Central time zone, and Phoenix is in the Mountain time zone; noon, eleven, ten. If it’s noon in Boston, it’s ten o’clock AM in Phoenix. Here’s a slightly harder question: if it’s noon in Boston, what time is it in Phoenix during Daylight Savings Time? Most of Arizona doesn’t observe Daylight Savings Time, so if it’s noon in Boston, it’s 9 AM in Phoenix. What about the Navajo Nation in the northwestern part of Arizona? Here, Daylight Savings Time is observed. You can’t even make a rule that all of Arizona is always on Mountain Standard Time.

Indiana is another example of bizarre time zones. For most of the 20th century, Indiana was firmly in the Central time zone. Starting in the 1960s, the line between Eastern and Central time slowly moved west from the Ohio border. Some countries opted not to observe Daylight Savings Time. In 2006, the entire state started to observe DST, but the northwest and southwest corners of the state remained firmly in the Central time zone. The odd geographic boundaries of time zones aren’t limited to the United States, either; Broken Hill, New South Wales, Australia is thirty minutes behind the rest of New South Wales.

Working out reliable answers to all of these questions is the domain of the Time Zone Database, a catalog of every time zone, time zone change, and every strange time-related political argument. It records Alaska’s transition from the Julian to the Gregorian calendar. It describes an argument in a small Michigan town in 1900. It’s used in Java, nearly every kind of Linux, hundreds of software packages, and at least a dozen of the servers and routers you’re using to read this right now.


The idea of daylight savings time was first suggested by Benjamin Franklin in a 1784 essay to the Journal de Paris. An Economical Project for Diminishing the Cost of Light suggested that by simply moving the clocks forward and backward in accordance with ‘sun’ time, fewer candles would be burnt at night. Over the course of a year, this would save the city of Paris sixty-four million pounds of candles. Franklin also suggested posting guards in the shops of candle makers so no family would be permitted more than one pound of candles per week. It was also suggested that all church bells ring at the crack of dawn, and cannons be fired in every street, to wake the sluggards and squeeze every last drop of productivity from the populous.

The first serious publication suggesting a deviation from solar time was A System of National Time for Railroads, published in 1870 by Charles Ferdinand Dowd. This proposal, given to superintendents of railroad lines at the time, set out time zones across the United States, although the details were a bit fuzzy. Years later, troubles with where to place these time zones were worked out. On November 18th, 1883 — the Day of Two Noons — church bells rang twenty-four times in an hour.

Deep in the recesses of the time zone database — most often called tz or just zoneinfo — lie hundreds of interesting observations and anecdotes about how time is, or was, observed in different parts of the world. For example, in the 1990s, the Amundsen-Scott station at the South Pole used the same time zone as the McMurdo base on the coast. However, because the generators run at 60.1 Hz, the clocks had to be set back five minutes every few days. In the early 2000s, Brazil’s daylight savings time was delayed in years with elections. Since Brazil uses electronic voting machines that cannot have their time changed, the country cannot change from standard to daylight savings time between the first and second rounds of elections. The solution to this problem is either change the date daylight savings starts, change the voting machines, or change the constitution.


The creator of the time zone database is Arthur David Olson, who, in 1986 created a tool to easily parse different time zones, and the dates they were in use. For example, the time zone ‘compiler’ will parse a human-readable table, and spit out what time zone applies at what point in history:

# Zone     NAME            GMTOFF  RULE/SAVE       FORMAT  [UNTIL]
Zone    US/Hawaii       -10:30  USA             H%sT    1933 Apr 30 2:00
                        -10:30  1:00            HDT     1933 May 1 2:00
                        -10:30  USA             H%sT    1947 Jun 8 2:00
                        -10:00  -               HST

This bit of code applies the normal USA daylight savings rules in Hawaii until April 30, 1933, then do a Hawaii’s day’s worth of daylight saving, then switch back to standard rules until June 8, 1947, and finally go on to permanent standard time. All of this is exquisite in its completeness and sublime in its readability.

Since 1986, the loose amalgamation of time zone volunteers grew, and in 1993, a proposal for standardized names for time zones was submitted by Paul Eggert. You’ve seen these names before, hidden deep in the time and date settings of your Linux distribution, OS X, and even some Macintoshes going back to at least Mac OS 8. Every time zone is defined by a name in the format of MAJOR_REGION/COUNTRY/CITY, such as North_America/US/Los_Angeles and Asia/Afganistan/Kabul.

With the human and machine-readable compiler and some sort of organizational nomenclature, the modern Time Zone Database was more or less set up by the mid-1990s. After that, it was only a matter of finding where and when time zones changed and bringing them into the database. This is not an easy task; in 2015, no one knew when daylight savings would begin in Morocco. This was originally ascribed to an incorrect news report, but more investigation revealed a version of the database from 2012 incorrectly predicted Morocco would fall back on the last Sunday in September.


But where do these updates come from? Who scours the news for mentions of changes to daylight savings time. An army of volunteers, with a peculiar hobby. Or at the very least knowledge of how the time zones in your computer are actually updated. Simply by sending a few emails, anyone can relay the fact that a dictator doesn’t want to wake up before dawn, or a country is changing time zones because of a drop in oil prices.

Time is the most fundamental thing any of us will ever deal with. However, because no one really wants to get up too early, we’ve invented clocks, time zones, and politicized it. Time, thanks to railroads and agriculture, are in flux, and every change in time zones is recorded in the time zone database. It is the database of the time lords, and one of the most significant historical documents found on every Linux distribution.


Filed under: Featured, History, Interest, linux hacks, Original Art

No comments:

Post a Comment