Member-only story

How I wrote “Epoch From Calendar” tool

Tom Smykowski
8 min readFeb 4, 2022

--

You may be one of people, that like me, have to deal with epoch. For those fortunate to not know what it is, it is a format of representation of time in seconds. People just chose a date in the past, and count seconds to every other date. For example 1643995442 marks 1643995442 seconds since the “start date”.

It is a fancy way of representing date, that has a great advantage: it can be saved in a database column of integer type. However, for people, it is not so great, because it’s hard to imagine birthday based on epoch.

Since I am a programmer, I have to deal with epoch often. Especially since modern data storing solutions available e.g. on cloud are really bad at handling time in more “human design” formats like ISO:

2022-02-04T17:24:07Z

For years I have been using a Epoch Converter: https://www.epochconverter.com/. It is a great tool. However, it is time consuming to put date into it to get epoch. And often that is what you want to do. For example I need to simulate a car that started to drive one hour ago, and will burn all full in one hour to check if the display screen shows correct information. So I have to get epoch for -1h and +1h. Epoch converter does not help a lot here.

Also copying the epoch value is time consuming, because you have to click the field, copy the value, and so on. It seems like a second, but during testing, when you do it hundreds of times, it sums up to be time consuming.

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

🚀 Senior/Lead Frontend Engineer | Angular · Vue.js · React | Design Systems, UI/UX | Looking for a new project! 📩 contact@tomasz-smykowski.com

No responses yet