The three types of time

David Gilbertson
12 min readFeb 3, 2024

Handling dates and times in code can be tricky. Understanding that there are three types of time, that play by different rules, can help prevent bugs and ensure your code behaves as intended.

Before I describe these three types of time, let’s warm up with a riddle.

Alice and Bob were born at the exact same moment in time, in neighbouring towns somewhere in Florida. They met in school and immediately bonded over the fact that they had existed for the exact same number of seconds. Their love — naturally — flourished, and many years later, Bob took Alice out to a…

--

--