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

add toEpochSecond methods for efficient access

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 9
    • 9
    • core-libs
    • 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.

      Attachments

        Issue Links

          Activity

            People

              ntv Nadeesh Tv
              rriggs Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: