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. |
getFullName
, getFullName
, getOffset
, getOffset
, getShortName
, getShortName
, leftShift
, toTimeZone
addShutdownHook
, any
, any
, asBoolean
, asType
, average
, 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
, stream
, sum
, sum
, tap
, toArrayString
, toSpreadMap
, toString
, use
, use
, use
, with
, with
, withTraits
Supports the getAt operator; equivalent to calling the ZoneOffset#getLong(java.time.temporal.TemporalField) method.
field
- a TemporalFieldReturns the hours component of this offset. If the offset's total seconds are negative, a negative value will be returned.
Returns the minutes component of this offset. If the offset's total seconds are negative, a negative value will be returned.
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 an OffsetDateTime of this offset and the provided LocalDateTime.
dateTime
- a LocalDateTimeReturns an OffsetDateTime of this offset and the provided LocalTime.
time
- a LocalTimeReturns the ZoneOffset currently associated with the system default ZoneId.