Member-only story
⏰ 3 Ways To Store Time Duration Explained
To handle time duration in frontend, backend and architecture, choices have to be made. From the article you’ll learn about 3 best ways to store time duration
Today, I was browsing some release notes, as I usually do and found one exciting thing in PostgreSQL 15.3 notes:
Re-allow exponential notation in ISO-8601 interval fields (Tom Lane)
Interval input like P0.1e10D isn't officially sanctioned by ISO-8601, but we accepted it for a long time before version 15, so re-allow it.
Wait, what?
P0.1e10D
What in the name of partitioned primary index is that?
It looks like the forename of the second electric car tycoon child.
From the short note we learn it is a part of 8601 ISO standard and it describes an interval.
The 8601 ISO standard is about time formats, so it has to have to do something with time.
Is it a time interval? In what universe?
After extensive research (Wikipedia) I’ve found out some interesting facts.
Yes! PostgreSQL offers a way to store time interval in the 8601 ISO format…