public enum TimeScale extends Enum<TimeScale>
Defines some time scales for usage both in civil life and in science.
Any conversion is usually not bijective. That means that for example an UTCtimestamp can be mapped in a unique way to UT1, GPS or TAI (provided that there are no negative leap seconds) but in reverse not. More important: Conversions often happen in millisecondprecision or worse so they are more or less like approximation procedures.
Enum Constant and Description 

GPS
Is used by the GPSnavigation system and counts SIseconds relative
to the start of GPS.

POSIX
Counts the seconds relative to UNIXepoch 19700101T00:00:00Z
which is two years before UTCepoch.

TAI
International atomic time which is based on the SIseconds of an
atomic clock and presents a continuous scale relative to 19580101.

TT
The Terrestrial Time is not bound to the rotation of the earth
and is a dynamic time derived from ephmerides (theoretical ideal).

UT
Mean solar time with variable seconds bound to the rotation of the earth.

UTC
Counts the seconds relative to UTCepoch which started at
midnight on the calendar days 19720101 (19720101T00:00:00Z)
inclusive all leap seconds.

Modifier and Type  Method and Description 

static double 
deltaT(GregorianDate date)
Estimates the delta between TT and UT1 in decimal seconds depending on given date.

static double 
deltaT(int year,
int month)
Estimates the delta between TT and UT1 in decimal seconds depending on given year and month.

static TimeScale 
valueOf(String name)
Returns the enum constant of this type with the specified name.

static TimeScale[] 
values()
Returns an array containing the constants of this enum type, in
the order they are declared.

public static final TimeScale POSIX
Counts the seconds relative to UNIXepoch 19700101T00:00:00Z which is two years before UTCepoch.
Leap seconds are not counted but ignored according to POSIXstandard. Before the UTCepoch 19720101 the second is effectively defined as the 86400th part of mean solar day (UT1). After this UTCepoch the POSIXsecond is with the exception of leap second events equal to the SIsecond based on atomic clocks, but in long term effectively similar to the UT1second based on mean solar time.
POSIX is more present in computer realms than UTC although there is no precision in calculation of SIseconds (a bug of UNIXspecification). The definition of the reference timezone on zero meridian of Greenwich is the same as in UTC.
During a leap second the transformation of POSIXtime to an UTCtimestamp is not defined. An old convention in the UNIX world tries to reset the clock by one second AFTER the leap second, so effectively mapping the leap second to the next day despite of its obvious written form as last second of current day (see also Wikipediapage). The current description of POSIXtime explicitly states however that the relation between the current day time and the current POSIXvalue is not specified and dependent on the implementation. Time4J maps the leap second to the current day as the last second. This corresponds to an UNIXvariation where a clock is reset at the begin of a leap second instead of at the end of a leap second.
public static final TimeScale UTC
Counts the seconds relative to UTCepoch which started at midnight on the calendar days 19720101 (19720101T00:00:00Z) inclusive all leap seconds.
Time4J handles all UniversalTime
timestamps before
the UTCepoch as mean solar time (UT). The second is therefore
defined as the 86400th part of the mean solar day before 1972.
After the UTCepoch 19720101 the second is always the
SIsecond based on atomic clocks.
UniversalTime
public static final TimeScale TAI
International atomic time which is based on the SIseconds of an atomic clock and presents a continuous scale relative to 19580101.
There is no second which is interpreted respective labelled as leap second. Hence this scale is decoupled from civil day and only useful in a scientific context. As consequence the astronomic day has no meaning on this scale.
Strictly spoken, the scale definition of TAI is a statistical approximation to the definition of an SIsecond because the average of around 250 atomic clocks worldwide is used. But the deviations are in picoseconds or smaller which is not in the focus of this API.
Users need to be careful about the period between 1958 and 1972 because Time4J applies approximations here: First to note, the SIsecond was introduced in year 1967 so we can just speak about atomic seconds before that date in an approximated way. Second, the nowadays used TAIscale had got its name on a conference in year 1971, third to note, the TAIancestors were still directly synchronized with UT2 hence had still got a vague astronomical reference. At the calendar date 19720101, the difference between TAI and UTC was defined as exactly 10 seconds (TAI = UTC + 10), plus the count of atomic seconds between 1958 and 1972. This difference is fixed for all timestamps in epoch seconds because both TAI and UTC counts in pure SIseconds since 1972. But note: If TAI and UTC are resolved to an elementoriented notation (YYYYMMDD HH:MM:SS) then the difference between TAI and UTC increases with every inserted leap second because of the different labelling. A TAI day does not know leap seconds. In the year 2017 this difference between a TAI day and an UTC day has increased to 37 seconds.
public static final TimeScale GPS
Is used by the GPSnavigation system and counts SIseconds relative to the start of GPS.
GPS was introduced on 6th of January 1980. All earlier timestamps are not supported by Time4J. Between 1972 and 1980 there were 9 leap seconds therefore following relation holds leaving aside the different epoch reference: GPS + delta = UTC  9 = TAI  19 where delta stands for the POSIXdifference between 19720101 and 19800106.
TAI
public static final TimeScale TT
The Terrestrial Time is not bound to the rotation of the earth and is a dynamic time derived from ephmerides (theoretical ideal).
This standard was redefined since 1991 taking into account the altitude of an atomic clock relative to the surface of the earth. The predecessors ET (Ephemeris Time) and TDT (Terrestrial Dynamic Time) are equivalent to TT with millisecond precision. Time4J uses the approximation formula TT = TDT = ET = TAI + 32,184 SIseconds. See also: Wikipedia.
Due to the uncertainty of estimating deltaT, this time scale is not supported before the year 2000. Keep also in mind that this scale is NOT always monotone for any time around the year 1972 or earlier. Users should handle this scale as approximation for those ancient times.
TAI
,
deltaT(int, int)
public static final TimeScale UT
Mean solar time with variable seconds bound to the rotation of the earth.
UT is technically labelled as UT1 and often mixed up with UTC because leap seconds are rare events and hardly noticed in civil life. The deviation of UT relative to TT is called "deltaT" (difference TT  UT) and is regularly published by IERS. Time4J uses polynomial expressions for the estimation of deltaT. These expressions are based on the work of the Belgian astronomer Jean Meeus and allow the limited conversion between UT and the other scales not bound to the rotation of the earth.
Due to the uncertainty of estimating deltaT, this time scale is not supported after the year +3000. Keep also in mind that this scale is NOT monotone, especially not after the start of year 1972. Users should generally handle this scale as approximation.
UTC
,
deltaT(int, int)
public static TimeScale[] values()
for (TimeScale c : TimeScale.values()) System.out.println(c);
public static TimeScale valueOf(String name)
name
 the name of the enum constant to be returned.IllegalArgumentException
 if this enum type has no constant with the specified nameNullPointerException
 if the argument is nullpublic static double deltaT(int year, int month)
Estimates the delta between TT and UT1 in decimal seconds depending on given year and month.
The estimation is mainly based on a polynomial expression of the NASA.
year
 gregorian/julian year from 2000 until +3000month
 gregorian/julian month in range 112IllegalArgumentException
 if any parameter is out of rangepublic static double deltaT(GregorianDate date)
Estimates the delta between TT and UT1 in decimal seconds depending on given date.
The estimation is mainly based on a polynomial expression of the NASA.
date
 gregorian date from year 2000 until year +3000IllegalArgumentException
 if the date is out of rangeCopyright © 2014–2019. All rights reserved.