For example, the last minute of the year 1995 was 61 seconds long, thanks to an added leap second.Most computer clocks are not accurate enough to be able to reflect the leap-second distinction.Some computer standards are defined in terms of Greenwich mean time (GMT), which is equivalent to universal time (UT).
After adjusting the year number, 1900 is subtracted from it.
For example, if the current year is 1999 then years in the range 19 to 99 are assumed to mean 1919 to 1999, while years from 0 to 18 are assumed to mean 2000 to 2018.
Note that this is slightly different from the interpretation of years less than 100 that is used in Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation.
Unfortunately, the API for these functions was not amenable to internationalization.
As of JDK 1.1, the class is intended to reflect coordinated universal time (UTC), it may not do so exactly, depending on the host environment of the Java Virtual Machine.
Nearly all modern operating systems assume that 1 day = 24 × 60 × 60 = 86400 seconds in all cases.
In UTC, however, about once every year or two there is an extra second, called a "leap second." The leap second is always added as the last second of the day, and always on December 31 or June 30.
That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates.