That old common arbitrator, Time.
The grand unifying of Perl date modules discussion is live again on the datetime list, and TAI came up in conversation. Hadn’t thought about TAI in a while. TAI is international atomic time and measures real time. TAI plus leapsecond support is UTC, the standard for all atomic timescales.
Programmatic support for TAI is available from DJB’s libtai which comes in 2 flavours: TAI64, covering a few hundred billion years with 1-second precision; TAI64NA, covering the same period with 1-attosecond precision. Also supports casting to Gregorian or Julian days to support well known calendar algorithms. From Perl you can use Time::TAI64. See also DJB’s UTC, TAI, and Unix time.
I’m not sure an epoch system that stretches from the before the existence of the earth, but doesn’t quite reach the predicted heat death of the universe is flexible enough for me. Though as Abigail mentioned in the datetime thread
…with 2 64 int integers, one could deal with 584 billion years, an attosecond precision, and 4 bits to spare.
Well, as long as we have room to grow.