Odysseia - UNIX Timestamps

Odysseia - UNIX Timestamps
Photo by Aron Visuals / Unsplash

ARK Core has been using its own version of timestamps since its inception. As far as I can tell it did so to avoid to avoid the Year 2038 problem which relates to representing time in many digital systems as the number of seconds passed since 00:00:00 UTC on 1 January 1970 and storing it as a signed 32-bit integer.

Such implementations cannot encode times after 03:14:07 UTC on 19 January 2038. Similar to the Y2K problem, the Year 2038 problem is caused by insufficient capacity used to represent time. That's how ARK Core ended up introducing its own timestamp system but it still did the mistake of storing those timestamps again as 32-bit integers. This just pushes the problem out a few decades instead of fixing the issue by storing them as 64-bit integers.

Creating your own starting point for your timestamps instead of following the Unix time standard might be a solution, but it isn't a great one, or even one that is needed. Odysseia replaces the old genesis timestamps with the unix timestamps to follow a well adopted standard that is easy to parse and understand.

This means that the genesis block will always have the value of the epoch that was chosen during the generation of it, represented in total seconds elapsed since 1970. All subsequent blocks will build on top of that timestamp with genesisTime + (blockHeight * blockTime) to create a valid unix timestamp.