ZoneOffset (Groovy JDK enhancements)

Package: java.time

## Class ZoneOffset

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `long` | `getAt(TemporalField field)` Supports the getAt operator; equivalent to calling the ZoneOffset#getLong(java.time.temporal.TemporalField) method.
    `int` | `getHours()` Returns the hours component of this offset.
    `int` | `getMinutes()` Returns the minutes component of this offset.
    `int` | `getSeconds()` Returns the seconds component of this offset.
    `OffsetDateTime` | `leftShift(LocalDateTime dateTime)` Returns an OffsetDateTime of this offset and the provided LocalDateTime.
    `OffsetTime` | `leftShift(LocalTime time)` Returns an OffsetDateTime of this offset and the provided LocalTime.
    `ZoneOffset` | `systemDefault()` Returns the ZoneOffset currently associated with the system default ZoneId.
    `TimeZone` | `toTimeZone()` Returns a generally equivalent TimeZone.

  - #### Methods inherited from class java.time.ZoneId

    `getFullName`, `getFullName`, `getOffset`, `getOffset`, `getShortName`, `getShortName`, `leftShift`, `toTimeZone`

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

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `collect`, `collect`, `collect`, `dump`, `each`, `eachMatch`, `eachMatch`, `eachWithIndex`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `findResult`, `findResult`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `isNotCase`, `iterator`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `split`, `sprintf`, `sprintf`, `stream`, `tap`, `toString`, `use`, `use`, `use`, `with`, `with`, `withCloseable`, `withStream`, `withTraits`

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

    `numberAwareCompareTo`

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

    `getAt`, `getAt`

- - ### Methods Detail

    - #### public long getAt(TemporalField field)

      Supports the getAt operator; equivalent to calling the ZoneOffset#getLong(java.time.temporal.TemporalField) method.

      Parameters:
        `field` - a TemporalField
      Returns:
        the ZoneOffset's field value
      Since:
        2.5.0

    - #### public int getHours()

      Returns the hours component of this offset. If the offset's total seconds are negative, a negative value will be returned.

      Returns:
        the hours component value
      Since:
        2.5.0

    - #### public int getMinutes()

      Returns the minutes component of this offset. If the offset's total seconds are negative, a negative value will be returned.

      Returns:
        the minutes component value
      Since:
        2.5.0

    - #### public int getSeconds()

      Returns the seconds component of this offset. This is not the same as the total seconds. For example:

              def offset = ZoneOffset.ofHoursMinutesSeconds(0, 1, 1)
              assert offset.seconds == 1
              assert offset.totalSeconds == 61

      If the offset's total seconds are negative, a negative value will be returned.

      Returns:
        the seconds component value
      Since:
        2.5.0

    - #### public OffsetDateTime leftShift(LocalDateTime dateTime)

      Returns an OffsetDateTime of this offset and the provided LocalDateTime.

      Parameters:
        `dateTime` - a LocalDateTime
      Returns:
        an OffsetDateTime
      Since:
        2.5.0

    - #### public OffsetTime leftShift(LocalTime time)

      Returns an OffsetDateTime of this offset and the provided LocalTime.

      Parameters:
        `time` - a LocalTime
      Returns:
        an OffsetTime
      Since:
        2.5.0

    - #### public ZoneOffset systemDefault()

      Returns the ZoneOffset currently associated with the system default ZoneId.

      Returns:
        a ZoneOffset
      Since:
        2.5.0
      See Also:
        ZoneId#systemDefault()

    - #### public TimeZone toTimeZone()

      Returns a generally equivalent TimeZone. The offset will be truncated to minutes.

      Returns:
        a TimeZone
      Since:
        2.5.0