Understanding ISO 8601 and UTC

Biseldev
4 min readJun 10, 2020

--

Hi!, I am a web developer and these particular concepts (ISO and UTC) used to be a bit confusing to me, so I set about researching a little more, and in the following lines, I am going to try to make it clear to you.

Let’s start imagining a situation in which you are trying to save critical information in a database. This information can be access through an application from anywhere in the world.

How do you plan to present the information correctly to each user?

We can represent dates in different ways, and this can cause difficulties. The ISO 8601 was developed to avoid these complications.

The basic idea consists of specifying the periods starting with the longest and following with the short ones. This way we start with the year then the month and finally with the day. e.g., 2020–01–27.

The full standard covers ways to write:

  • Date
  • Time of day
  • Coordinated universal time (UTC)
  • Local time with offset to UTC
  • Date and time
  • Time intervals
  • Recurring time intervals

If you are interested to know more details about the specification, you can read more here:

Summing up, we can say that ISO 8601 is an official standard for expressing the date and time.

Now that we’ve understood this concept, we can move on to the UTC definition.

UTC is a term between the english version: Coordinated Universal Time (CUT) and the french version: Temps Universal Coordonné (TUC). Currently, this is the official standard for the scientific, naval, air, and other communities. It has been established with the purpose of coordinate and ensure the measures in all the globe.

Something that can be confusing about UTC is that a lot of people name it as GMT. GMT (Greenwich Mean Time) is another standard that was the predecessor of UTC. GMT used to be the official standard, but it was calculated based on the average solar time, that means, it was calculated based on the rotation motion of the earth. On the other hand, UTC is calculated based on atomic time, and even when it has an error range is much more precise.

Now, How a date is calculated based on the UTC?

The earth is divide by imaginary lines called parallels and meridians. We know the line that divides the planet in the middle horizontally is the Ecuator parallel and vertically the prime meridian. We also know that the earth has a spherical shape, and it takes 24 hours to make a 360-degree turn. If we divide this 360 degrees by 24, we get 24 segments of the same size, every one with 15 degrees. The earth takes 1 hour to travel one segment. We call each of these a time zone.

The time zone in the prime meridian (Greenwich Median) which longitude is defined by 0 is considered the UTC. Then we designate the other time zones based on the offset they have from UTC. The next map illustrates this better:

World time zones

This way, if the time in Greenwich it’s 6:00 AM, in México city (UTC-6) would be 12:00 AM, and in Beijing (UTC+8) would be 2:00 PM.

So, let’s say in Greenwich today is January 27th, 2020 at 6:00 AM. Using ISO standard, this would be as follows:

2020–01–27T06:00:00Z (Greenwich)

2020–01–27T00:00:00–06:00 (México City)

2020–01–27T14:00:00+08:00 (Beijing)

The Z at the end in Greenwich date is to indicate the time zone is zero UTC offset, and the ±[hh][mm] in the following dates is the notation to specify the offset.

Now, before I finish, I would like to add one more thing. In the map above, we can see the offsets for standard time. UTC does not change with seasons, but local time does. If you are reading this article, let’s say, during summer, maybe the offsets are not going to match with the hour in your city. Some regions update their clocks one hour forward during summer due to daylight saving time (DST), so be aware of this.

To recap…

  • ISO 8601: It is a representation of dates to keep an international standard and avoid difficulties when handling dates and time.
  • UTC: It is the official time standard to synchronize the clocks and keep precision in measurements and other activities.

I hope this helps you to understand better the difference between ISO 8601 and UTC. If you want to go deeper you can visit the pages where all this information has been collected:

Thanks Agustín Peña to review the content and the grammar for me.

--

--