Timezone Fundamentals Everyone Should Understand.

Never get confused about time zones again.

Apoorv
Geek Culture
5 min readJan 21, 2022

--

For a novice software developer, it is always very confusing when two teams have a discussion on which time zone to follow. Some of the team members could be from the different time zone, as a result, the time which they are observing is different.

Photo by Md. Alamin Mir on Unsplash

This makes it difficult to understand and build the logic around time. For all those smart kids who are facing issues while wrapping their heads while understanding the concept behind having a different time zone, don’t you worry I got you covered? This article will give you a good insight into major standards that are being followed in the industry.

Since the notation of time varies based upon in which part of the world we are located. Of Course, there was a need to have uniform time standards for social, commercial and legal purposes. Otherwise, flights leaving one country will reach another at an altogether different time and the synchronisation amongst the country will be affected. Hold tight, relax we are about to start.

GMT ( Greenwich Mean Time)

GMT stands for Greenwich Mean Time, most of us has already heard about the term. To explain Greenwich is a town in London, which was considered to be zero longitudes. Just to refresh the facts, latitude and longitude come under the coordinate system which is used to identify any location on the planet. So whichever location you visit has some sort of coordinates that help us identify it.
You can use this website to find coordinates of your location https://www.latlong.net/, and don’t share it with anyone since they can track you down.

As the Greenwich was considered as a zero longitude, any location away from it has a time which is either addition/subtraction of a few hours based upon the fact when that location will see the sun first.

Image showcasing Greenwich in United Kingdom. Source: Google Map

In the above image, you can clearly see Greenwich is located in London.

Many of us might be curious since the earth is almost round(except for those who are flat earther) that why we all came in the term that zero longitude passes from Greenwich specifically through the Royal observatory.

First, just to make things clear there is no actual line passing, it's all just an imaginary line. After my research since the British empires was having dominance at a time, that gave them the superpower to make this decision and everyone has to agree. I hope it’s clear now, although they are other theories as well, let’s believe this since it's widely available and agreed upon.
Correct me, if you know anything else, share your thoughts in the comment.

Time Zones

Another crucial logic that needs to be understood is the need for timezones. As discussed earlier there was a need to have a standard for all those commercials, legal and other issues. For your information, the whole earth is divided into 24 different time zones.

Source: Wikipedia.

Time Zones are also not any actual zones, but imaginary areas between two consecutive longitudes. Ideally, a zone has a difference of one hour from the consecutive zone. But the difference of time could be even more or less, as countries are given leverage to maintain uniformity throughout their geographical boundary.

An image specifically showcasing India. Source Wikipedia.

Let’s take the case of India, which are having two zones technically but as a standard taken as a single zone from west to east. So after slight adjustment, India has taken +5:30 hours more than the prime meridian as its time zone. Although actually, it varies from +5:00 or +6:00 from the prime meridian. It helps the entire country to come under the same zone.

So timezone is a very important concept which everyone should understand. Just consider anything on the west of Greenwich has a timezone less than the time at Greenwich and vice versa.

Another interesting obvious fact is the timezone can be common for various countries as its a difference between two vertical lines known as longitudes, that the reason it can cover many countries in one go.

UTC (Coordinated Universal Time)

UTC stand for coordinated universal time which is the successor to Greenwich meantime. UTC was adopted in 1970 and implemented in 1972 before that it was called GMT.

There is nothing to be understood differently in UTC as it has the same time zone which we describe in the case of GMT. All similar ground is considered in the case of UTC is the prime meridian passes through Greenwich which is considered as zero longitude and was used to calculate the time zone of other locations.

Every region coming towards the east of Greenwich was considered a positive timezone and vice versa. The actual reason behind this is that the earth moves from west to east and it’s the east part of the globe that tends to see the sunlight before the other zones.

epoch

Epoch also known as Unix time Unix timestamp. It is nothing but seconds that have elapsed since January 1970.

Various programming language has some function that can give you UNIX timestamp. The Epoch is generally an easy way of storing the dates. Since as per the user requirement we can change the format of the final time with a user want to see.

Storing the time in a different format can cause issues while you are working with various microservices. For example, one microservices is storing the time in UTC format but another one is storing in IST format at that time the difference in the time zone can cause an issue.

Whenever you are trying to build any particular project decide on some guidelines about the time zone you will be following otherwise it might cause a big issue in the long run.

Final Thoughts

Understanding different type format time zones and standards are very crucial for any person specifically a software developer. Having a good understanding of time zones will help you prevent some unforeseen situations.

I hope after reading the article you must have got a decent understanding of the time concepts. Honestly, I will highly recommend you to research a bit more about the logic behind time zone calculation and other findings which will help you enhance your understanding of the topic.

Share your thought, if you know some fun facts about the time zones in the comments, will love to hear those.

--

--