Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8307466 java.time.Instant calculation bug in until and between methods
  3. JDK-8307790

Release Note: Error Computing the Amount of Milli- and Microseconds between `java.time.Instants`

    XMLWordPrintable

Details

    Description

      The computation of the time between `java.time.Instants` using `ChronoUnit.MILLIS.between(t1, t2)`, `ChronoUnit.MICROS.between(t1, t2)`, `t1.until(t2, MILLIS)`, or `t1.until(t2, MICROS)` has been corrected. The implementation computing the number of units between Instants, as of JDK 18, did not propagate carry and borrow between seconds and nanoseconds when computing milliseconds and microseconds.


      Attachments

        Activity

          People

            rriggs Roger Riggs
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: