Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4272347

(cal/tz) support leap seconds

XMLWordPrintable

      [Gregorian]Calendar accept the value 0 to 59 as SECOND field. There are leap second that can take value of 0 to 60 -- actually, UNIX C library defines second is range from 0 to 61. Also, when calcurating UTC from/to Calendar, leapseconds should be considered.

      Olson public time zone data 1999e lists,

      # @(#)leapseconds 7.12

      # Allowance for leapseconds added to each timezone file.

      # The International Earth Rotation Service periodically uses leap seconds
      # to keep UTC to within 0.9 s of UT1
      # (which measures the true angular orientation of the earth in space); see
      # Terry J Quinn, The BIPM and the accurate measure of time,
      # Proc IEEE 79, 7 (July 1991), 894-905.
      # There were no leap seconds before 1972, because the official mechanism
      # accounting for the discrepancy between atomic time and the earth's rotation
      # did not exist until the early 1970s.

      # The correction (+ or -) is made at the given time, so lines
      # will typically look like:
      # Leap YEAR MON DAY 23:59:60 + R/S
      # or
      # Leap YEAR MON DAY 23:59:59 - R/S

      # If the leapsecond is Rolling (R) the given time is local time
      # If the leapsecond is Stationary (S) the given time is UTC

      # Leap YEAR MONTH DAY HH:MM:SS CORR R/S
      Leap 1972 Jun 30 23:59:60 + S
      Leap 1972 Dec 31 23:59:60 + S
      Leap 1973 Dec 31 23:59:60 + S
      Leap 1974 Dec 31 23:59:60 + S
      Leap 1975 Dec 31 23:59:60 + S
      Leap 1976 Dec 31 23:59:60 + S
      Leap 1977 Dec 31 23:59:60 + S
      Leap 1978 Dec 31 23:59:60 + S
      Leap 1979 Dec 31 23:59:60 + S
      Leap 1981 Jun 30 23:59:60 + S
      Leap 1982 Jun 30 23:59:60 + S
      Leap 1983 Jun 30 23:59:60 + S
      Leap 1985 Jun 30 23:59:60 + S
      Leap 1987 Dec 31 23:59:60 + S
      Leap 1989 Dec 31 23:59:60 + S
      Leap 1990 Dec 31 23:59:60 + S
      Leap 1992 Jun 30 23:59:60 + S
      Leap 1993 Jun 30 23:59:60 + S
      Leap 1994 Jun 30 23:59:60 + S
      Leap 1995 Dec 31 23:59:60 + S
      Leap 1997 Jun 30 23:59:60 + S
      Leap 1998 Dec 31 23:59:60 + S

            okutsu Masayoshi Okutsu
            ktakahassunw Koushi Takahashi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: