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

java.time LocalDate and LocalTime ofInstant() factory methods

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b94

      Description

      External question sites indicate that users have difficulty converting between java.util.Date and LocalDate, and also between Instant and LocalDate/LocalTime. This user difficulty can be resolved with some additional methods.

      Currently, the following methods exist:

       ZonedDateTime.ofInstant(Instant, ZoneId);
       OffsetDateTime.ofInstant(Instant, ZoneId);
       LocalDateTime.ofInstant(Instant, ZoneId);
       OffsetTime.ofInstant(Instant, ZoneId);

      This enhancement proposes to add the same method to LocalDate and LocalTime. It can reasonably be argued this was a simple oversight in the original development.

        Activity

        scolebourne Stephen Colebourne created issue -
        rriggs Roger Riggs made changes -
        Field Original Value New Value
        Fix Version/s tbd_major [ 11972 ]
        rriggs Roger Riggs made changes -
        Status New [ 10000 ] Open [ 1 ]
        scolebourne Stephen Colebourne made changes -
        rriggs Roger Riggs made changes -
        Fix Version/s 9 [ 14949 ]
        Fix Version/s tbd_major [ 11972 ]
        ntv Nadeesh Tv (Inactive) made changes -
        Assignee Roger Riggs [ rriggs ] Nadeesh Tv [ ntv ]
        rriggs Roger Riggs made changes -
        Summary Additional ofInstant() factory methods java.time LocalDate and LocalTime ofInstant() factory methods
        dbessono Dmitry Bessonov made changes -
        Link This issue relates to JCK-7302970 [ JCK-7302970 ]
        hgupdate HG Updates made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolved In Build team [ 17324 ]
        Resolution Fixed [ 1 ]
        hgupdate HG Updates made changes -
        Resolved In Build team [ 17324 ] master [ 18256 ]
        hgupdate HG Updates made changes -
        Resolved In Build master [ 18256 ] b94 [ 17556 ]
        iris Iris Clark made changes -
        Labels jsr379-annex2-tbd
        iris Iris Clark made changes -
        Labels jsr379-annex2-tbd jsr379-annex1
        darcy Joe Darcy made changes -
        Link This issue csr of CCC-8133079 [ CCC-8133079 ]

          People

          • Assignee:
            ntv Nadeesh Tv (Inactive)
            Reporter:
            scolebourne Stephen Colebourne
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: