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

add toEpochSecond methods for efficient access

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs
    • b100

      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
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: