| Modifier and Type | Class and Description |
|---|---|
| private static class | SystemUtcRules.
Data holder. |
| Modifier and Type | Field and Description |
|---|---|
| private AtomicReference | dataRef
The table of leap second dates. |
| pack-priv static final SystemUtcRules | INSTANCE
Singleton. |
| private static final Pattern | LEAP_FILE_FORMAT
Leap second file format. |
| private static final String | LEAP_SECONDS_TXT
The leap seconds config file. |
| private static final long | serialVersionUID
Serialization version. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public UtcInstant | convertToUtc(TaiInstant
the TAI instant to convert, not null taiInstant)Implements abstract org. Converts a |
| public int | getLeapSecondAdjustment(long
the date as a Modified Julian Day (number of days from the epoch of 1858-11-17) mjDay)Implements abstract org. Gets the leap second adjustment on the specified date. |
| public long[] | getLeapSecondDates()
Implements abstract org. Gets all known leap second dates. |
| public String | |
| public int | getTaiOffset(long
the date as a Modified Julian Day (number of days from the epoch of 1858-11-17) mjDay)Implements abstract org. Gets the offset to TAI on the specified date. |
| private static SystemUtcRules. | Returns: the list of loaded rules, not nullLoads the rules from files in the class loader, often jar files. |
| private static SystemUtcRules. | loadLeapSeconds(URL
the jar file to load, not null url)Loads the leap second rules from a URL, often in a jar file. |
| private Object | |
| pack-priv void | register(long
the Modified Julian Day that the leap second occurs at the end of mjDay, int the leap seconds to add/remove at the end of the day, either -1 or 1 leapAdjustment)Adds a new leap second to these rules. |
| private static long | Returns: the TAI secondsthe MJD that the leap second is added to changeMjd, int the new offset after the leap offset)Gets the TAI seconds for the start of the day following the day passed in. |
| dataRef | back to summary |
|---|---|
| private AtomicReference<SystemUtcRules. The table of leap second dates. | |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final SystemUtcRules INSTANCE Singleton. | |
| LEAP_FILE_FORMAT | back to summary |
|---|---|
| private static final Pattern LEAP_FILE_FORMAT Leap second file format. | |
| LEAP_SECONDS_TXT | back to summary |
|---|---|
| private static final String LEAP_SECONDS_TXT The leap seconds config file. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization version. | |
| SystemUtcRules | back to summary |
|---|---|
| private SystemUtcRules() Restricted constructor. | |
| convertToUtc | back to summary |
|---|---|
| public UtcInstant convertToUtc(TaiInstant taiInstant) Implements abstract org. Doc from org. Converts a This method converts from the TAI to the UTC time-scale using the leap-second rules of the implementation.
| |
| getLeapSecondAdjustment | back to summary |
|---|---|
| public int getLeapSecondAdjustment(long mjDay) Implements abstract org. Doc from org. Gets the leap second adjustment on the specified date.
The UTC standard restricts the adjustment on any day to Any leap seconds are added to, or removed from, the end of the specified date. If the UTC specification is altered to allow multiple leap seconds at once, then the result of this method would return a number with an absolute value greater than one.
| |
| getLeapSecondDates | back to summary |
|---|---|
| public long[] getLeapSecondDates() Implements abstract org. Doc from org. Gets all known leap second dates. The dates are returned as Modified Julian Day values. The leap second is added to, or removed from, the end of the specified dates. The dates will be sorted from earliest to latest.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract org. Doc from org. The name of these rules. | |
| getTaiOffset | back to summary |
|---|---|
| public int getTaiOffset(long mjDay) Implements abstract org. Doc from org. Gets the offset to TAI on the specified date. The TAI offset starts at 10 in 1972 and varies from then on based on the dates of leap seconds. The offset will apply for the whole of the date.
| |
| loadLeapSeconds | back to summary |
|---|---|
| private static SystemUtcRules. Loads the rules from files in the class loader, often jar files.
| |
| loadLeapSeconds | back to summary |
|---|---|
| private static SystemUtcRules. Loads the leap second rules from a URL, often in a jar file. | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() Resolves singleton.
| |
| register | back to summary |
|---|---|
| pack-priv void register(long mjDay, int leapAdjustment) Adds a new leap second to these rules.
| |
| tai | back to summary |
|---|---|
| private static long tai(long changeMjd, int offset) Gets the TAI seconds for the start of the day following the day passed in.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final long[] | dates
The table of leap second date when the leap second occurs. |
| private final int[] | offsets
The table of TAI offset after the leap second. |
| private static final long | serialVersionUID
Serialization version. |
| private final long[] | taiSeconds
The table of TAI second when the new offset starts. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public long |
| dates | back to summary |
|---|---|
| private final long[] dates The table of leap second date when the leap second occurs. | |
| offsets | back to summary |
|---|---|
| private final int[] offsets The table of TAI offset after the leap second. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization version. | |
| taiSeconds | back to summary |
|---|---|
| private final long[] taiSeconds The table of TAI second when the new offset starts. | |
| Data | back to summary |
|---|---|
| private Data(long[] dates, int[] offsets, long[] taiSeconds) Constructor. | |
| getNewestDate | back to summary |
|---|---|
public long getNewestDate()
| |