JSR-310-backport only supports functions that will be included in Java 8. TAI (and true UTC) will not be a supported function, so it cannot be included in backport. The only alternative would be to try using threeten-extra-project, which contains the TAIInstant class, but the whole additional project may be out of date (very old code).
I myself am working on my Time4J library, which has TAI, GPS, and UTC support in addition to POSIX.
[ UPDATE since July 2014 : Time4J is now available as a stable version of time4j-v1.0 . This discussion has been taken into account - see, for example, Moment.toString (TimeScale) .]
Correction and detailed notes on new OP posts:
a) Yes, TAI monotonically increases in SI units even during leap seconds. If this is just what you want, you can choose TAI, but there is a trap. If you want to describe timestamps, then TAI will provide you with incorrect timestamps (just compare the first and second columns of the Wikipedia diagram ). The reason is that civilian life is governed by UTC, not TAI.
b) About my comments that the Wikipedia diagram is incorrect, I looked at it very carefully and changed my mind. The relationship between POSIX and TAI is not fixed (10 s offset only in 1972), so please excuse my mistake. So far I have not thought much about TAI, but about POSIX and UTC. But thanks for this question and this enlightening discussion so that you deserve my exaltation. All this is complicated. When we talk about timestamps presented at different timelines, we need to make the difference between the ymdhms form and the epochsecs form. Let's look at it in detail for the time 1999-01-01T00: 00: 00Z (UTC scale):
i) TAI = (29 * 365 + 7) days * 86400 + 22 leap seconds + 10s (offset at 1972) = 915148832 ii) UTC = TAI - 10 = 915148822 (fixed relation between UTC and TAI on epoch-second-level) iii) POSIX = UTC - 22 leap seconds = 915148800 => (ymdhms-form); i) TAI (915148800 + 32) = 1999-01-01T00:00:32 (based on TAI-"day" = 86400 SI-secs) ii) UTC = 1999-01-01T00:00:00 (stripped off former 22 leap secs in conversion to ymdhms) iii) POSIX = 1999-01-01T00:00:00 (fixed relation between UTC and POSIX with exception of leapsecs)
So why the statement that TAI does not count seconds of a jump? It does not account for leapsecs in the form of ymdhms, but, of course, it takes them into account at the second level level (the requirement of monotony!). And POSIX? It does not account for seconds of jump, a niter in the form of ymdhms or at the level of eras. So, we do not have a fixed connection between TAI and POSIX. A second jump table is required for conversion.
c) What will POSIX say about the spasmodic behavior of the second? See here . Especially pay attention to the expression: "The relationship between the actual time of the day and the current value in seconds since the era is not defined." So this also applies to the second jump. It depends on the implementation of the watch if they jump before the second jump or jump after or freeze for one second.
d) Yes, System.currentTimeMillis() will get the equivalent of POSIX Time (albeit in milliseconds, not seconds).
e) It should be noted that the TAI label was not defined until 1971 and International Atomic Time no earlier than 1958, so the proleic scale of the triple-extracurricular TAIInstant is somehow nonsense. Therefore, I would not apply TAI until 1972. Here I go with Steve Allen, an expert on timelines.
f) If you need a time object that is "transported through the JVM and machines", then UTC itself requires the ubiquity of the distribution / existence of the same second level table. If you choose TAI, you still need this second jump table so that applications can convert TAI timestamps to UTC- or POSIX timestamps. Therefore, I doubt that you can have a monotonously increasing time stamp and at the same time ignore leap seconds. TAI does not offer a solution to this dilemma.
Answers to the OP question / resume from 2013-12-31:
Your CVs on TAI and POSIX are correct.
About UTC, you must first understand that UTC is a compromise. On the one hand, it is designed to observe the sun, on the other hand, the second on the UTC scale is exactly the same as on the TAI scale, namely SI-second (atomic definition). You are right when you say that the speed of rotation of the earth slows down unpredictably, so the jump seconds are inserted several times. The difference between UT1 (average solar time) and UTC should always be less than 0.9 SI seconds. Thus, this and the fact of equal seconds SI are the main ideas of UTC. As an aside, the adaptation of the exotic UTC-SLS to JSR-310 is incompatible with these basic UTC ideas. Regarding the predictability of leap seconds, BIPM in Paris announces every six months if there will be a necessary leap after 6 months or not, so you have this predictability six months in advance.
Perhaps the pedantic correction in the UTC section, you wrote: "The sun is always at noon at UTC." A similar statement is also given in javadoc of the java.time.Instant class about the so-called time scale of java. Left aside the fact that you, of course, did not want to say that the position of the sun does not depend on your local position, it is not even correct at the correct longitude at noon. What for? From an astronomical / scientific point of view, you must first remember that the average time of the sun is not the same as the true local solar time that you are observing (simply by giving the keyword “equation of time”). In addition, since UTC is still based on atomic time and uses atomic time for synchronization, there is a so-called delta-T connection between UT1 and UTC. This delta is within 0.9 seconds and is regularly published by IERS / BIPM in Bulletin B. You need to know this delta when you want to get the real position of the sun and when the sun will be highest.
The "Presentation of Time" section, in my opinion, is too simple. Well, we can say that TAI and POSIX count seconds, while UTC is more likely represented in the form year / month / day /...-. But we can really apply both concepts on all scales. But we need to carefully distinguish between these ideas and think carefully about how to convert. Note that Wikipedia even chose the ymdhms form for TAI in the charts. Well, computers can best store prime integers. And POSIX or TAI can easily be saved in this format. But, as I said, the interpretation of these integers is not always simple. In the case of TAI, you even need a second leap table to convert to a readable ymdhms form in Civil format (UTC or POSIX).
About the next section, "Time Transfer," I agree with paragraphs 1-3.
Your last statement: “On the other hand, it is easy to convert“ human interpretation ”from POSIX to UTC. It’s correct, except for seconds of jump. Well, I give a suitable translation between different scales with my future library. It has a built-in, but customizable table of the second level, and in the future I also plan to use IANA-TZDB data as a source for such a table.
Everyone knows that most business developers do not need such accuracy. Most people simply align POSIX and UTC and are likely to be satisfied with any smoothing hardware solutions on Linux or Google’s NTP servers. True UTC and TAI (that is, given the seconds of the jump) require more effort. Therefore, you need to decide whether your software architecture is needed for scientific accuracy.
And just to point out, JSR-310 does not officially refer to very large-scale POSIX in general, instead they say that their Instant class should be UTC-SLS by definition (see also this interesting discussion ).
Finally, I am elegant for this discussion. It also helped me clarify my thoughts on TAI in my library. Thanks.