次の方法で共有


IChronoLocalDateTime.ToInstant(ZoneOffset) Method

Definition

Converts this date-time to an Instant.

[Android.Runtime.Register("toInstant", "(Ljava/time/ZoneOffset;)Ljava/time/Instant;", "GetToInstant_Ljava_time_ZoneOffset_Handler:Java.Time.Chrono.IChronoLocalDateTime, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual Java.Time.Instant? ToInstant (Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("toInstant", "(Ljava/time/ZoneOffset;)Ljava/time/Instant;", "GetToInstant_Ljava_time_ZoneOffset_Handler:Java.Time.Chrono.IChronoLocalDateTime, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member ToInstant : Java.Time.ZoneOffset -> Java.Time.Instant
override this.ToInstant : Java.Time.ZoneOffset -> Java.Time.Instant

Parameters

offset
ZoneOffset

the offset to use for the conversion, not null

Returns

an Instant representing the same instant, not null

Attributes

Remarks

Converts this date-time to an Instant.

This combines this local date-time and the specified offset to form an Instant.

This default implementation calculates from the epoch-day of the date and the second-of-day of the time.

Java documentation for java.time.chrono.ChronoLocalDateTime.toInstant(java.time.ZoneOffset).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to