What Time Zone Is It, Mr. Wolf?

  • keywords:
    • software
    • python
    • cartopy
    • ephem
    • naturalearth
    • globe
  • published:
  • updated:
  • Atom Feed

Recently I travelled to southern Spain, to the beautiful cities of Córdoba and Granada. Whilst there, I experienced the Spanish siesta for the first time. I admit that it struck me as a little odd beforehand but whilst I was there it made perfect sense - the Sun was so hot in the early afternoon that it was very wise to stay inside and do nothing, likewise it was very enjoyable to stay up late into the warm evening with a drink in hand. It took me a couple of days to start thinking about when noon occurs and about what time zone countries choose to be.

For example, Córdoba has a longitude of -4.8° and London has a longitude of -0.1° therefore, crudely, one would expect the Sun to reach "high noon" approximately 19 minutes later in Córdoba than in London yet the time zone is 1 hour earlier. In effect, if "high noon" occurred at exactly 12:00 (local time) in London then mathematically one would expect the Sun to reach "high noon" at approximately 13:19 (local time) in Córdoba. This would explain why it is so hot in the early afternoon - it is actually midday! In other words, why is the time zone of a country that is West of Greenwich actually ahead of Greenwich? If the Sun rises in the East and sets in the West then Western countries should all be behind Greenwich and Eastern countries should all be ahead of Greenwich.

I wrote a collection of Python scripts to investigate when "solar noon" and "chronological noon" occur for every point on the globe. I then was able to confirm that some countries' time zone does not appear to be very strongly linked with when the Sun is at its peak, as I had always assumed as a child. For this little project I used the excellent PyEphem Python module to calculate the sunrise, noon and sunset of every point on the globe (using elevation data provided by the GLOBE project). I used time zone information from Natural Earth, which itself obtains data from the CIA World Factbook (which has a nice PDF map of the world time zones). There are four sections to this work, which are outlined below.

§1 Elevation Map

The first step was to create a simple 2D binary array of elevation using the GLOBE dataset. This would then allow me to quickly determine the average elevation of a pixel in later sections. The map that this dataset produces is shown below.

  1. 512x254 (86.6 KiB)
  2. 1,024x508 (252.1 KiB)
  3. 2,048x1,017 (316.9 KiB)

Never forget how high Antartica is.

§2 Sun Maps

The second step was to use the elevation dataset and the PyEphem module to determine the sunrise, noon and sunset of each pixel on the surface of the Earth. All times are measured from the reference time of 2019-03-20 12:00 UTC and are saved as 2D binary arrays. The three maps that these datasets produce are shown below.

  1. 512x256 (87.7 KiB)
  2. 1,024x513 (243.6 KiB)
  3. 2,006x1,004 (338.2 KiB)
  1. 512x256 (84.7 KiB)
  2. 1,024x513 (236.8 KiB)
  3. 2,006x1,004 (318.4 KiB)
  1. 512x256 (88.1 KiB)
  2. 1,024x513 (244.1 KiB)
  3. 2,006x1,004 (335.0 KiB)

Note how both the sunrise and sunset values are affected by the ground elevation (see the blue/red divide as it crosses the sea onto Antartica) but that the noon values are not.

§3 Time Zone Map

The third step was to rasterise the Natural Earth time zone dataset and save it as a 2D binary array. This would allow easy and direct comparison between the datasets as they would all be simple arrays that directly lay on top of one another, rather than the more accurate polygons of this individual dataset. The map that this dataset produces is shown below.

  1. 512x256 (83.0 KiB)
  2. 1,024x513 (207.7 KiB)
  3. 2,006x1,004 (223.1 KiB)

Note the tiny little enclaves of different time zones that are scattered around Antartica.

§4 Time Zone Difference Map

Now that all the previous datasets have been created they can be used to calculate what the time zone should be (if "time zone" is to be solely defined in relation to the occurrence of "solar noon") and then compare that number with the actual time zone. The map of the difference between the calculated time zone (the noon values from §2) and the actual time zone (from §3) is shown below.

  1. 512x259 (141.9 KiB)
  2. 1,024x518 (409.0 KiB)
  3. 2,012x1,017 (337.1 KiB)

To me, there are a couple of very interesting features in this final map.

Within my Python collection I have written a script to check the time zone of particular cities, the output of which is shown below.

Here you can see quantitative supporting evidence for my comments: Kashgar (in Western China) and Beijing (in Eastern China) are both in the same time zone and yet there is 2 hours 40 minutes difference between the occurrence of noon; the Western European capitals (Lisbon, Madrid, London, Paris, Berlin, Warsaw) spread 30.1° of longitude, which is 2.01 twenty-fourths of Earth, but they only have 1 hour between them.

In summary, of course there is more to a country's time zone than the occurrence of "high noon" on 2019-03-20. Not only are there: economic reasons why a country might choose to be the same time zone as their neighbour; or political reasons why a country might choose to be a different time zone as their neighbour; or practical reasons why a large country might choose to have just one time zone, one must also consider the history. Humans have existed for far longer than the clock, when accurate clocks were invented they would have been used in accordance with the long standing societal traditions of the land in which they were placed. Therefore, too much should not be read into the discussion above - it is merely an interesting Python programming project. Córdoba knows exactly what it is doing: it is very enjoyable to eat a large lunch at 12:00 and have a nap for a couple of hours afterwards whilst the sun is at its hottest, if one can do that and also have the same time zone as (perhaps) their largest trading partner then who cares what time it is when noon occurs?