MCPcopy Create free account
hub / github.com/MenoData/Time4J / checkNegativeLS

Method checkNegativeLS

base/src/main/java/net/time4j/Moment.java:1864–1880  ·  view source on GitHub ↗

Prüft, ob eine negative Schaltsekunde vorliegt. @param posixTime UNIX-time in seconds @param ts local timestamp used for error message @throws ChronoException if a negative leap second is touched

(
        long posixTime,
        PlainTimestamp ts
    )

Source from the content-addressed store, hash-verified

1862 * @throws ChronoException if a negative leap second is touched
1863 */
1864 static void checkNegativeLS(
1865 long posixTime,
1866 PlainTimestamp ts
1867 ) {
1868
1869 LeapSeconds ls = LeapSeconds.getInstance();
1870
1871 if (
1872 ls.supportsNegativeLS()
1873 && (ls.strip(ls.enhance(posixTime)) > posixTime)
1874 ) {
1875 throw new ChronoException(
1876 "Illegal local timestamp due to "
1877 + "negative leap second: " + ts);
1878 }
1879
1880 }
1881
1882 /**
1883 * <p>Pr&uuml;ft, ob der Zeitpunkt vor 1972 liegt. </p>

Callers 1

inMethod · 0.95

Calls 4

getInstanceMethod · 0.95
supportsNegativeLSMethod · 0.95
stripMethod · 0.95
enhanceMethod · 0.95

Tested by

no test coverage detected