public class UTCScale extends Object implements TimeScale
UTC is related to TAI using step adjustments from time to time according to IERS (International Earth Rotation Service) rules. Before 1972, these adjustments were piecewise linear offsets. Since 1972, these adjustments are piecewise constant offsets, which require introduction of leap seconds.
Leap seconds are always inserted as additional seconds at the last minute of the day, pushing the next day forward. Such minutes are therefore more than 60 seconds long. In theory, there may be seconds removal instead of seconds insertion, but up to now (2010) it has never been used. As an example, when a one second leap was introduced at the end of 2005, the UTC time sequence was 2005-12-31T23:59:59 UTC, followed by 2005-12-31T23:59:60 UTC, followed by 2006-01-01T00:00:00 UTC.
This is intended to be accessed thanks to TimeScales
,
so there is no public constructor.
AbsoluteDate
,
Serialized FormModifier and Type | Method and Description |
---|---|
AbsoluteDate |
getFirstKnownLeapSecond()
Get the date of the first known leap second.
|
AbsoluteDate |
getLastKnownLeapSecond()
Get the date of the last known leap second.
|
double |
getLeap(AbsoluteDate date)
Get the value of the previous leap.
|
<T extends RealFieldElement<T>> |
getLeap(FieldAbsoluteDate<T> date)
Get the value of the previous leap.
|
String |
getName()
Get the name time scale.
|
boolean |
insideLeap(AbsoluteDate date)
Check if date is within a leap second introduction in this time scale.
|
<T extends RealFieldElement<T>> |
insideLeap(FieldAbsoluteDate<T> date)
Check if date is within a leap second introduction in this time scale.
|
int |
minuteDuration(AbsoluteDate date)
Check length of the current minute in this time scale.
|
<T extends RealFieldElement<T>> |
minuteDuration(FieldAbsoluteDate<T> date)
Check length of the current minute in this time scale.
|
double |
offsetFromTAI(AbsoluteDate date)
Get the offset to convert locations from
TAIScale to instance. |
<T extends RealFieldElement<T>> |
offsetFromTAI(FieldAbsoluteDate<T> date)
Get the offset to convert locations from
TAIScale to instance. |
double |
offsetToTAI(DateComponents date,
TimeComponents time)
Get the offset to convert locations from instance to
TAIScale . |
String |
toString() |
public double offsetFromTAI(AbsoluteDate date)
TAIScale
to instance.offsetFromTAI
in interface TimeScale
date
- conversion dateTAIScale
time scale to get a location in instance time scaleTimeScale.offsetToTAI(DateComponents, TimeComponents)
public <T extends RealFieldElement<T>> T offsetFromTAI(FieldAbsoluteDate<T> date)
TAIScale
to instance.offsetFromTAI
in interface TimeScale
T
- type of the filed elementsdate
- conversion dateTAIScale
time scale to get a location in instance time scaleTimeScale.offsetToTAI(DateComponents, TimeComponents)
public double offsetToTAI(DateComponents date, TimeComponents time)
TAIScale
.offsetToTAI
in interface TimeScale
date
- date location in the time scaletime
- time location in the time scaleTAIScale
time scaleTimeScale.offsetFromTAI(AbsoluteDate)
public String getName()
public AbsoluteDate getFirstKnownLeapSecond()
public AbsoluteDate getLastKnownLeapSecond()
public boolean insideLeap(AbsoluteDate date)
This method will return false for all time scales that do not
implement leap seconds, even if the date corresponds to a leap second
in UTC scale
.
insideLeap
in interface TimeScale
date
- date to checkpublic <T extends RealFieldElement<T>> boolean insideLeap(FieldAbsoluteDate<T> date)
This method will return false for all time scales that do not
implement leap seconds, even if the date corresponds to a leap second
in UTC scale
.
insideLeap
in interface TimeScale
T
- type of the filed elementsdate
- date to checkpublic int minuteDuration(AbsoluteDate date)
This method will return 60 for all time scales that do not
implement leap seconds, even if the date corresponds to a leap second
in UTC scale
, and 61 for time scales that do implement
leap second when the current date is within the last minute before the
leap, or during the leap itself.
minuteDuration
in interface TimeScale
date
- date to checkpublic <T extends RealFieldElement<T>> int minuteDuration(FieldAbsoluteDate<T> date)
This method will return 60 for all time scales that do not
implement leap seconds, even if the date corresponds to a leap second
in UTC scale
, and 61 for time scales that do implement
leap second when the current date is within the last minute before the
leap, or during the leap itself.
minuteDuration
in interface TimeScale
T
- type of the filed elementsdate
- date to checkpublic double getLeap(AbsoluteDate date)
This method will return 0.0 for all time scales that do not implement leap seconds.
public <T extends RealFieldElement<T>> T getLeap(FieldAbsoluteDate<T> date)
This method will return 0.0 for all time scales that do not implement leap seconds.
Copyright © 2002-2020 CS GROUP. All rights reserved.