OffsetDateTime.WithSecond(Int32) Method

Definition

Returns a copy of this OffsetDateTime with the second-of-minute altered.

[Android.Runtime.Register("withSecond", "(I)Ljava/time/OffsetDateTime;", "", ApiSince=26)]
public Java.Time.OffsetDateTime? WithSecond(int second);
[<Android.Runtime.Register("withSecond", "(I)Ljava/time/OffsetDateTime;", "", ApiSince=26)>]
member this.WithSecond : int -> Java.Time.OffsetDateTime

Parameters

second
Int32

the second-of-minute to set in the result, from 0 to 59

Returns

an OffsetDateTime based on this date-time with the requested second, not null

Attributes

Remarks

Returns a copy of this OffsetDateTime with the second-of-minute altered. The date and offset do not affect the calculation and will be the same in the result. This instance is immutable and unaffected by this method call.

Java reference for java.time.OffsetDateTime.withSecond.

Applies to