Language

OffsetTime.Of Method

Definition

Overloads

Name Description
Of(Int32, Int32, Int32, Int32, ZoneOffset)

Obtains an instance of OffsetTime from an hour, minute, second and nanosecond.

Of(LocalTime, ZoneOffset)

Obtains an instance of OffsetTime from a local time and an offset.

Of(Int32, Int32, Int32, Int32, ZoneOffset)

Obtains an instance of OffsetTime from an hour, minute, second and nanosecond.

[Android.Runtime.Register("of", "(IIIILjava/time/ZoneOffset;)Ljava/time/OffsetTime;", "", ApiSince=26)]
public static Java.Time.OffsetTime? Of(int hour, int minute, int second, int nanoOfSecond, Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("of", "(IIIILjava/time/ZoneOffset;)Ljava/time/OffsetTime;", "", ApiSince=26)>]
static member Of : int * int * int * int * Java.Time.ZoneOffset -> Java.Time.OffsetTime

Parameters

hour
Int32

the hour-of-day to represent, from 0 to 23

minute
Int32

the minute-of-hour to represent, from 0 to 59

second
Int32

the second-of-minute to represent, from 0 to 59

nanoOfSecond
Int32

the nano-of-second to represent, from 0 to 999,999,999

offset
ZoneOffset

the zone offset, not null

Returns

the offset time, not null

Attributes

Remarks

Obtains an instance of OffsetTime from an hour, minute, second and nanosecond. This creates an offset time with the four specified fields. This method exists primarily for writing test cases. Non test-code will typically use other methods to create an offset time. LocalTime has two additional convenience variants of the equivalent factory method taking fewer arguments. They are not provided here to reduce the footprint of the API.

Java reference for java.time.OffsetTime.of.

Applies to

Of(LocalTime, ZoneOffset)

Obtains an instance of OffsetTime from a local time and an offset.

[Android.Runtime.Register("of", "(Ljava/time/LocalTime;Ljava/time/ZoneOffset;)Ljava/time/OffsetTime;", "", ApiSince=26)]
public static Java.Time.OffsetTime? Of(Java.Time.LocalTime? time, Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("of", "(Ljava/time/LocalTime;Ljava/time/ZoneOffset;)Ljava/time/OffsetTime;", "", ApiSince=26)>]
static member Of : Java.Time.LocalTime * Java.Time.ZoneOffset -> Java.Time.OffsetTime

Parameters

time
LocalTime

the local time, not null

offset
ZoneOffset

the zone offset, not null

Returns

the offset time, not null

Attributes

Remarks

Obtains an instance of OffsetTime from a local time and an offset.

Java reference for java.time.OffsetTime.of.

Applies to