Package: java.time

## Class ZonedDateTime

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `ZonedDateTime` | `clearTime()` Returns an ZonedDateTime with the time portion cleared.
    `String` | `format(String pattern)` Formats this date/time with the provided DateTimeFormatter pattern.
    `String` | `format(FormatStyle dateTimeStyle)` Formats this date/time in the provided, localized FormatStyle.
    `String` | `getDateString()` Formats this date/time with the DateTimeFormatter#ISO_LOCAL_DATE formatter and appends the zone's short name, e.g.
    `String` | `getDateTimeString()` Formats this date/time with the DateTimeFormatter#ISO_LOCAL_DATE_TIME formatter and appends the zone's short name, e.g.
    `String` | `getTimeString()` Formats this date/time with the DateTimeFormatter#ISO_LOCAL_TIME formatter and appends the zone's short name, e.g.
    `ZonedDateTime` | `minus(long seconds)` Returns a ZonedDateTime that is `seconds` seconds before this date/time.
    `ZonedDateTime` | `next()` Returns a ZonedDateTime that is one second after this date/time.
    `ZonedDateTime` | `parse(CharSequence text, String pattern)` Parse text into a ZonedDateTime using the provided pattern.
    `ZonedDateTime` | `plus(long seconds)` Returns a ZonedDateTime that is `seconds` seconds after this date/time.
    `ZonedDateTime` | `previous()` Returns a ZonedDateTime that is one second before this date/time.
    `Calendar` | `toCalendar()` Returns a generally equivalent instance of Calendar.
    `Date` | `toDate()` Returns a generally equivalent instance of Date.

  - #### Methods inherited from class java.lang.Object

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `collect`, `collect`, `collect`, `contains`, `count`, `dump`, `each`, `eachWithIndex`, `equals`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `flatten`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `groupBy`, `groupBy`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `iterator`, `join`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `size`, `split`, `sprintf`, `sprintf`, `sum`, `sum`, `tap`, `toArrayString`, `toSpreadMap`, `toString`, `use`, `use`, `use`, `with`, `with`, `withTraits`

  - #### Methods inherited from interface java.time.temporal.Temporal

    `downto`, `downto`, `rightShift`, `upto`, `upto`

  - #### Methods inherited from interface java.lang.Comparable

    `numberAwareCompareTo`

  - #### Methods inherited from interface java.time.temporal.TemporalAccessor

    `getAt`

- - ### Methods Detail

    - #### public ZonedDateTime clearTime()

      Returns an ZonedDateTime with the time portion cleared.

      Returns:
        a ZonedDateTime
      Since:
        2.5.0

    - #### public String format(String pattern)

      Formats this date/time with the provided DateTimeFormatter pattern.

      Parameters:
        `pattern` - the formatting pattern
      Returns:
        a formatted String
      Since:
        2.5.0
      See Also:
        DateTimeFormatter

    - #### public String format(FormatStyle dateTimeStyle)

      Formats this date/time in the provided, localized FormatStyle.

      Parameters:
        `dateTimeStyle` - the FormatStyle
      Returns:
        a formatted String
      Since:
        2.5.0
      See Also:
        DateTimeFormatter

    - #### public String getDateString()

      Formats this date/time with the DateTimeFormatter#ISO_LOCAL_DATE formatter and appends the zone's short name, e.g. `2018-03-10EST`.

      Returns:
        a formatted String
      Since:
        2.5.0
      See Also:
        DateTimeFormatter

    - #### public String getDateTimeString()

      Formats this date/time with the DateTimeFormatter#ISO_LOCAL_DATE_TIME formatter and appends the zone's short name, e.g. `2018-03-10T14:34:55.144EST`.

      Returns:
        a formatted String
      Since:
        2.5.0
      See Also:
        DateTimeFormatter

    - #### public String getTimeString()

      Formats this date/time with the DateTimeFormatter#ISO_LOCAL_TIME formatter and appends the zone's short name, e.g. `14:34:55.144EST`.

      Returns:
        a formatted String
      Since:
        2.5.0
      See Also:
        DateTimeFormatter

    - #### public ZonedDateTime minus(long seconds)

      Returns a ZonedDateTime that is `seconds` seconds before this date/time.

      Parameters:
        `seconds` - the number of seconds to subtract
      Returns:
        a ZonedDateTime
      Since:
        2.5.0

    - #### public ZonedDateTime next()

      Returns a ZonedDateTime that is one second after this date/time.

      Returns:
        a ZonedDateTime
      Since:
        2.5.0

    - #### public ZonedDateTime parse(CharSequence text, String pattern)

      Parse text into a ZonedDateTime using the provided pattern.

      Parameters:
        `text` - String to be parsed to create the date instance
        `pattern` - pattern used to parse the text
      Returns:
        a ZonedDateTime representing the parsed text
      Since:
        2.5.0
      See Also:
        DateTimeFormatter
        ZonedDateTime#parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)

    - #### public ZonedDateTime plus(long seconds)

      Returns a ZonedDateTime that is `seconds` seconds after this date/time.

      Parameters:
        `seconds` - the number of seconds to add
      Returns:
        a ZonedDateTime
      Since:
        2.5.0

    - #### public ZonedDateTime previous()

      Returns a ZonedDateTime that is one second before this date/time.

      Returns:
        a ZonedDateTime
      Since:
        2.5.0

    - #### public Calendar toCalendar()

      Returns a generally equivalent instance of Calendar. The time value of the returned calendar is truncated to milliseconds and the time zone is determined by the zone of this date/time.

      Returns:
        a java.util.Calendar
      Since:
        2.5.0

    - #### public Date toDate()

      Returns a generally equivalent instance of Date. The time value of the returned date is truncated to milliseconds and will be adjusted to the current system default time zone.

      Returns:
        a java.util.Date
      Since:
        2.5.0