public class LeapSeconds
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| protected int[] | leapSecondsArray of number of leap seconds. | 
| protected long[] | millisecondsGPSForLeapSecondsArray of values of seconds after 1970, which are leap seconds. | 
| protected long[] | millisecondsUTCForLeapSecondsArray of values of seconds after 1970, which are UTC seconds. | 
| protected static LeapSeconds | singletonAll methods are static, but uses internally data of this class. | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | LeapSeconds() | 
| Modifier and Type | Method and Description | 
|---|---|
| static java.util.Date | dateFromGPS(long millisecondsGPS)Returns a Date object from given GPS-seconds. | 
| protected void | initFix()initializes the table of leap seconds with fix dates. | 
| static long | millisecondsGPSfromUTC(long millisecondsUTC) | 
| static int | secondsGPSfromUTC(int secondsUTC_1970) | 
| static void | setLeapSeconds(int idx,
              java.util.Date date)Sets the leap seconds for a given timestamp. | 
protected static LeapSeconds singleton
protected final int[] leapSeconds
protected long[] millisecondsUTCForLeapSeconds
protected long[] millisecondsGPSForLeapSeconds
public static void setLeapSeconds(int idx,
                                  java.util.Date date)
index - number of leap seconds for this date. It is the index in the table.date - The UTC timestamp after which a leap second is inserted.protected void initFix()
public static java.util.Date dateFromGPS(long millisecondsGPS)
millisecondsGPS - Value of milliseconds from Jan-1-1970, which counts also leap seconds.public static long millisecondsGPSfromUTC(long millisecondsUTC)
public static int secondsGPSfromUTC(int secondsUTC_1970)