Megosztás a következőn keresztül:


IChronoLocalDateTime.ToEpochSecond(ZoneOffset) Method

Definition

Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z.

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

Parameters

offset
ZoneOffset

the offset to use for the conversion, not null

Returns

the number of seconds from the epoch of 1970-01-01T00:00:00Z

Attributes

Remarks

Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z.

This combines this local date-time and the specified offset to calculate the epoch-second value, which is the number of elapsed seconds from 1970-01-01T00:00:00Z. Instants on the time-line after the epoch are positive, earlier are negative.

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.toEpochSecond(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