Epoch Article, Part 1

This is the first part of a two-part post about measuring time. Part two is here.

In Physics class, we learn how to measure different things. We measure length, area, volume, velocity, force, energy, momentum, etc. using stone age tools and, in most complex cases, even primary school math. Then we express the values in SI units, perhaps with some prefix, or in different units entirely, in which case everyone is confused and outraged.

However, there is something we learn to measure long before we hear the word “physics”. This thing is time. As small children, we get a seemingly firm grasp of clocks and calendars, and then, when we grow up, we regard time as something simple and not even worth talking about.

In this article, I want to give a hint that dealing with time is actually extremely complicated, or at least much more complicated than high school Physics curriculum.

From second to day

A second is one of the base SI units. Like all other base units, it is defined in a bizarre and counterintuitive manner, namely as “the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium-133 atom”. I will not comment on this definition, since I don’t really understand it myself.

Next, there is a minute, which is 60 seconds, right? Wrong. Since the Earth does not spin at a perfectly constant speed, sometimes it is neccessary to insert a leap second, which essentially makes an unlucky minute 61 seconds long. When a leap second is inserted, time goes like this:

… 23:59:58 23:59:59 23:59:60 00:00:00 00:00:01 …

To make things worse, leap seconds are added at irregular intervals.

60 minutes make an hour, and 24 hours make a day, and here we don’t encounter any difficulties… although, wait, we do. But let’s put them in the next section.

Time zones

Since the Sun rises and sets at different time depending on the longtitude, people created time zones. We could have just divided the Earth into 24 equal slices and call them time zones UTC-12 to UTC+11 or UTC-11 to UTC+12 if you prefer. It is a great idea, except everybody disliked it. Small countries didn’t want to be split between two time zones and so on. As a result, the map of time zones became surprisingly complex.

Map of time zones

There is one more strange thing about this map: time zones are not just weirdly shaped, there are also too many of them. Let’s look at the list. There are 39 time zones, some of which seem really redundant, like UTC+12:45.

In addition, time zones are not constant. Countries change them every now and then. For example, Samoa once decided to hop to the other side of the International Date Line and therefore skipped an entire day.

And then there is West Bank, where Israeli and Palestinian people live in accordance with different time zones…

DST

What’s next? In many countries, time is shifted one hour forward in spring and one hour backward in autumn, so that people’s waking hours are better aligned with the day / night cycle. There are lots of problems with this.

Firstly, countries shift clocks on different days. Secondly, countries in the Southern hemisphere have spring and autumn at the wrong time, so they enable DST when everybody else disables it. And thirdly, there are countries that think there is not enough confusion as is, so they add even more problems.

Russia, in which I happen to live, is one such country. Before every spring and autumn, some important guys toss a coin call random() ask the god of time measurement do the evaluation of possible economic gains and decide whether we should shift clocks. What I don’t understand is why they are getting a different answer every time. Makers of computers and smartphones tried to keep up, but apparently gave up on it. My iPhone is currently one hour ahead of real time.

From day to year

Let’s move to longer periods of time. A month can have 28 to 31 days, and the distribution of long and short months seems pretty random. Or at least it’s close enough to random that most people have trouble remembering it.

A stick man from xkcd tries to figure out how long October is

Actually, there is some logic behind this distribution, but it is a topic for a different article. Anyway, compared to what I covered in the previous sections, this is a minor annoyance. The big problem comes when you get to February, which becomes one day longer in leap years.

Leap years exist because the year does not have an integer number of days. It is very close to 365¼ days, and that’s why about one in four years is leap. Unfortunately, the number of days in a year is slightly different from 365¼, and therefore the Julian calendar, where exactly every fourth year was leap, didn’t work out well. People switched to Gregorian calendar, which has the following rules for deciding what years should be leap:

  • A year divisible by 4 is leap.
  • Well, unless it’s also divisible by 100, in which case it’s not leap.
  • But if the year is also divisible by 400, it will be leap.

So far, this is not too difficult to remember and/or implement in an app. There is one issue, though: remember how I said that we switched to a refined calendar? Of course, every country did this at a different time, and some countries did it in really weird ways.

And beyond

Years seem to be the easiest thing about dealing with time. Sure, there was no year 0, but it was long ago, and it doesn’t take more than a couple lines of code to implement anyway. Except this, years have no surprises for us, right? Wrong.

In the 20th century, people thought that the year 2000 is unimaginably far away and not worth thinking about. Hence, many systems stored only the last 2 digits of the year. As 2000 approached, programmers had to change all their code to accept four-digit years. As it always happens with this sort of thing, redoing took much more effort than making everything normal in the first place would. Also, some people apparently forgot to fix it at all.

Sign displaying year 1900

Some guys propose that we go one step further and switch to five-digit years right away. If I will be still maintaining this blog 8000 years later, I will surely write a follow-up post explaining if they were right or not.

One thing to consider

Did you know that our calendar isn’t the only one? Just imagine that we multiply all the problems presented here by the number of calendars used in the world. I must say that my imagination is not even nearly good enough for this.

Tom Scott’s video

Tom Scott once made a video about the same subject, so if you want to learn more, or just like to watch videos embedded in blog posts, here it is:

 

This was part one. Part two has a lot of interesting stuff about Julian date, Stardate, and Unix time. Check it out!

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Epoch Article, Part 1

  1. Pingback: Epoch Article, Part 2 | Nigin's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s