I work with timestamps A LOT. In fact, I often have to deal with streams of 5 million + &#x2F;second. Even worse, for most of them, microsecond precision is critical.<p>I&#x27;m convinced most languages do timestamps wrong. Specifically, they separate out the &quot;time&quot; component from the &quot;date&quot; component.<p>What&#x27;s a more common operation? Counting how many events happened in a span of time? Or shifting every timestamp by 15 days?<p>Timestamps should generally be designed for extremely fast and lightweight comparison, but keep enough information that a shift is doable. From my experience, all you need is: a unix timestamp, a microsecond (or nanosecond) offset, and the source timezone.<p>In this case, if you want to find elapsed time between two timestamps you simply subtract the unix timestamps and offsets. Very CPU friendly and easily vectorizable. You can do this even if the timestamps originated at different timezones (since everything is UTC under the hood).<p>What if you want to shift the date? Or group by date? Turns out computing the date on the fly is a very cheap operation. Easily can do hundreds of millions&#x2F;second on a single high-end server core.<p>an use whatever calendar system floats your boat.<p>Any timestamp system that relies on year&#x2F;month&#x2F;day semantics is rarely going to be optimized for the most common operations users do with timestamps. Even worse, for simple comparison you run into all the weird edge-cases that you wouldn&#x27;t have cared about if you stuck with a unix timestamp under the hood.