public class ZoneOffset
extends Object
GDK enhancements for ZoneOffset.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public long |
getAt(TemporalField field)Supports the getAt operator; equivalent to calling the ZoneOffset.getLong method. |
|
public int |
getHours()Returns the hours component of this offset. |
|
public int |
getMinutes()Returns the minutes component of this offset. |
|
public int |
getSeconds()Returns the seconds component of this offset. |
|
public OffsetDateTime |
leftShift(LocalDateTime dateTime)Returns an OffsetDateTime of this offset and the provided LocalDateTime. |
|
public OffsetTime |
leftShift(LocalTime time)Returns an OffsetDateTime of this offset and the provided LocalTime. |
|
public static ZoneOffset |
systemDefault(ZoneOffset type)Returns the ZoneOffset currently associated with the system default ZoneId. |
|
public TimeZone |
toTimeZone()Returns a generally equivalent TimeZone. |
| Methods inherited from class | Name |
|---|---|
class 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, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits |
Supports the getAt operator; equivalent to calling the ZoneOffset.getLong 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.
type - placeholder variable used by Groovy categories; ignored for default static methods