Clean up the type of time that programming needs to know

Seong-Am Kim
4 min readFeb 5, 2021
Photo by Kjartan Einarsson on Unsplash

As we write code, we often find that there are different concepts in time. I knew there was a different concept of time, but I thought I knew it and didn’t think about finding out more about it.

I faced a time problem while dealing with MongoDB this time, and I would like to organize it accurately and share what I studied.

Introduction to the type of time

1. GMT(平均時, Greenwich Mean Time)

Wikipedia introduces GMT as follows.

Greenwich Mean Time (GMT) is the mean solar time at the Royal Observatory in Greenwich, London, reckoned from midnight. At different times in the past, it has been calculated in different ways, including being calculated from noon as a consequence, it cannot be used to specify a precise time unless a context is given.

Photo by Jad Limcaco on Unsplash

In short, the time was set by the Greenwich Observatory in London.

2. UTC(協定世界時, Coordinated Universal Time)

It is effectively a successor to Greenwich Mean Time (GMT).

GMT is also called UTC, although the two terms are used in a mixture, they have different meanings technically.

UTC is a re-designated time zone based on the International Atomic Time based on the frequency of the Cesium atom in 1978 to address the slow flow of the Earth’s rotation cycle.

In short, it is a designated time zone again as the rotation of the Earth slows down.

Photo by Andrew Russian on Unsplash

Note) The reason why Earth’s rotation slows is because of the moon.

3. UTC offset

The UTC offset is the difference in hours and minutes from Coordinated Universal Time (UTC) for a particular place and date. It is generally shown in the format ±[hh]:[mm], ±[hh][mm], or ±[hh]. So if the time being described is one hour ahead of UTC (such as the time in Berlin during the winter), the UTC offset would be “+01:00”, “+0100”, or simply “+01”.

In Korea, where I am, UTC+09:00 is indicated, and this means that 9 hours earlier than UTC’s standard time.

Usually, each country or region gives its own name to the time zone they use, and in Korea, it is called Korea Standart Time (KST).

Offset is a time difference between countries according to UTC.

Note) Time zones and offsets are often confused, which is not the same. The reason is the dayling saving time.

The time zone is legally determined by the region or country and can be changed for political and economic reasons.

Summary

Photo by Kelly Sikkema on Unsplash

1. GMT(平均時, Greenwich Mean Time)

it is a designated time zone again as the rotation of the Earth slows down.

2. UTC(協定世界時, Coordinated Universal Time)

it is a designated time zone again as the rotation of the Earth slows down.

3. UTC offset

It refers to the time difference between UTC and countries, which is exactly different in meaning from time zone.

https://www.buymeacoffee.com/jayflow

--

--