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

add toEpochSecond methods for efficient access

    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:
      b100

      Description

      To efficiently get an epochSecond value:

      - add 'toEpochSecond(ZoneOffset) ' methods to 'LocalDate' and 'LocalTime'.
      - add 'toEpochSecond() ' method to 'OffsetTime'.

      The method on 'LocalDate' would be defined to set the time part to midnight (safe as ZoneOffset, not ZoneId)
      The methods on the time classes would be defined to set the date part to 1970-01-01.

        Issue Links

          Activity

          rriggs Roger Riggs created issue -
          rriggs Roger Riggs made changes -
          Field Original Value New Value
          Link This issue relates to JDK-8030864 [ JDK-8030864 ]
          rriggs Roger Riggs made changes -
          Description - add 'toEpochSecond(ZoneOffset) ' methods to 'LocalDate' and 'LocalTime'.
          - add 'toEpochSecond() ' method to 'OffsetTime'.

          The method on 'LocalDate' would be defined to set the time part to midnight (safe as ZoneOffset, not ZoneId)
          The methods on the time classes would be defined to set the date part to 1970-01-01.
          The complement of an efficient getDateTimeMillis:

          - add 'toEpochSecond(ZoneOffset) ' methods to 'LocalDate' and 'LocalTime'.
          - add 'toEpochSecond() ' method to 'OffsetTime'.

          The method on 'LocalDate' would be defined to set the time part to midnight (safe as ZoneOffset, not ZoneId)
          The methods on the time classes would be defined to set the date part to 1970-01-01.
          rriggs Roger Riggs made changes -
          Issue Type Bug [ 1 ] Enhancement [ 7 ]
          rriggs Roger Riggs made changes -
          Status New [ 10000 ] Open [ 1 ]
          rriggs Roger Riggs made changes -
          Assignee Roger Riggs [ rriggs ] Nadeesh Tv [ ntv ]
          rriggs Roger Riggs made changes -
          Description The complement of an efficient getDateTimeMillis:

          - add 'toEpochSecond(ZoneOffset) ' methods to 'LocalDate' and 'LocalTime'.
          - add 'toEpochSecond() ' method to 'OffsetTime'.

          The method on 'LocalDate' would be defined to set the time part to midnight (safe as ZoneOffset, not ZoneId)
          The methods on the time classes would be defined to set the date part to 1970-01-01.
          To efficiently get an epochSecond value:

          - add 'toEpochSecond(ZoneOffset) ' methods to 'LocalDate' and 'LocalTime'.
          - add 'toEpochSecond() ' method to 'OffsetTime'.

          The method on 'LocalDate' would be defined to set the time part to midnight (safe as ZoneOffset, not ZoneId)
          The methods on the time classes would be defined to set the date part to 1970-01-01.
          ntv Nadeesh Tv (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Understanding Fix Understood [ 10001 ]
          hgupdate HG Updates made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolved In Build team [ 17324 ]
          Understanding Fix Understood [ 10001 ]
          Fix Version/s 9 [ 14949 ]
          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 ] b100 [ 17728 ]
          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-8143413 [ CCC-8143413 ]

            People

            • Assignee:
              ntv Nadeesh Tv (Inactive)
              Reporter:
              rriggs Roger Riggs
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: