Unix Time is the best format for storing and sharing time.

Benjamin Cane
ITNEXT
Published in
1 min readApr 8, 2024

--

Whenever you need to store time in a file/database or send time in a request/event to another system, I recommend using the Unix Time format.

The Unix Time format is a number that represents the seconds since the Unix Epoch time, 00:00:00 January 1st, 1970 UTC.

Over the years, it’s also been extended down to nanoseconds.

As a format, Unix Time provides the right level of granularity, doesn’t suffer from problems due to daylight savings (as it is UTC-based), and is simple to store and process since it is a simple integer.

In contrast, other formats like ISO 8601 have many variations in its format. These variations create confusion, and while it’s a standard, the number of variations leaves it up to the engineer to implement them correctly.

Unix Time is simple, and in its simplicity, it reduces the complexity.

Enjoy this “Short Read”? Follow me on LinkedIn, for more bite-sized insights, opinions, and discussions on similar topics.

--

--