My avatar

flewkey

Level 10 Computer Mage

Time rant

Published on 2021-05-03 by flewkey

Bob wants to talk to a group of people who live in different areas. What time standard should Bob use to schedule the call? How about Coordinated Universal Time (UTC)? It is the internationally agreed upon standard for world time, so Bob should be able to use it, right?

Unfortunately, life is not so simple. If Bob scheduled a call for “05:00 UTC”, one other person will show up on-time. The rest will try to join at 17:00 (05:00 p.m.) in whatever their local time zone is. Frustrating situations like these are responsible for countdown timers becoming so common nowadays.

This insanity has been driving people mad since the beginning of time, but this is not the fault of individual people who don’t understand what “UTC” is. This is a systemic issue which ought to be corrected. If everybody learns to read analog clocks in primary school, they should learn about time zones as well.


12-hour time and 24-hour time

In 12-hour time, the clock wraps around every 12 hours, dividing the day into two periods: “a.m.” and “p.m.”. This is terrible, as it creates ambiguity when most people and clocks tell the time. The number “12” is also used in place of the number “0” for some reason, going against how numbers usually wrap around. Seeing 12-hour time on a digital clock makes me feel nauseous.

In 24-hour time, the clock wraps around every 24 hours, once per day. That’s all there is to it.

To convert 12-hour time to 24-hour time:

  1. Add 12 hours if it is “p.m.”
  2. If the hours column is equal to 24, set it back to 0

To convert 24-hour time to 12-hour time:

  1. Subtract 12 hours if it is 13:00 or greater
  2. If the hours column is equal to 0, set it to 12

Time zones 101

A time zone is just an area that follows a time standard. However, if computers all synced to different time standards depending on the region, that would be terrible. Instead, most of them sync to Coordinated Universal Time (UTC) instead. Then, they apply a positive or negative offset to UTC before formatting the time and displaying it to users.

As far as most people should be concerned, offsets are just acronyms that represent offsets from UTC. For example, Central European Time (CET) is one hour ahead of UTC. This means that it is also represented as UTC+1 or UTC+0100. Some time zones need more than an hour of precision as well. For example, Newfoundland Standard Time (NST) is represented as UTC-3:30 or UTC-0330.

Look up your time zone on this map. Memorize the acronym and UTC offset. Also understand that it will roll forward by an hour when Daylight Saving Time (summer time in Europe) applies. This will allow you to understand UTC time in relation to your time zone.

If you can remember the acronyms for other time zones, you will also be able to convert between them in your head. This is a useful ability to have. Some common time zones in North America worth remembering are Eastern Standard Time (UTC-5), Central Standard Time (UTC-6) and Pacific Standard Time (UTC-8).


Conclusion

Those who made it to the end of this post can count themselves among the few capable of reading time properly. If you thought time zones were interesting, wait until you hear about timekeeping. The NIST has a great page describing how time standards are kept. The rabbit hole goes deep.


Articles from blogs that I like

Build your project in our new language

Do you have a new systems programming project on your todo list? If you’re feeling adventurous, I would like you to give it a crack in our new systems programming language, and to use it to drive improvements in the less-developed areas of our standard libra…

From Drew DeVault's blog
Published on May 30, 2021

Safe pattern matching in CloudTube

Today I implemented video filters for CloudTube.Here is the documentation.This was more of a challenge than it appears, despite the large size and scope of that commit.On New CloudTube, I want all its features to be available without people needing to ena…

From Cadence's Blog
Published on May 11, 2021

Computer Science Basics: Types (in dart)

Inside of the dart language most types come from from the parent type Object which could be called the root type in this case. From the root type in the case of dart you can end up with a type tree a little like this for the basic types. With this tree her…

From Technically Alex's blog
Published on May 11, 2021

Generated with the spectacular power of openring