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
)
| 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üft, ob der Zeitpunkt vor 1972 liegt. </p> |
no test coverage detected