Get the latest tech news
Show HN: High-precision date/time in SQLite
A rich set of functions for working with date, time and durations.
Alternatively, you can store time values as a NUMBER (64-bit integer) of seconds (milli-, micro- or nanoseconds) since the Unix epoch (1970-01-01 00:00:00 UTC). Unix-like operating systems often record time as a 32-bit number of seconds, but since time_to_unix returns a 64-bit value, it is valid for billions of years into the past or future. Interactive examples in this post are powered by codapi — an open source tool I'm building.
Or read this on Hacker News