Language

LocalTime.ToEpochSecond(LocalDate, ZoneOffset) Method

Definition

Converts this LocalTime to the number of seconds since the epoch of 1970-01-01T00:00:00Z.

[Android.Runtime.Register("toEpochSecond", "(Ljava/time/LocalDate;Ljava/time/ZoneOffset;)J", "", ApiSince=31)]
public long ToEpochSecond(Java.Time.LocalDate? date, Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("toEpochSecond", "(Ljava/time/LocalDate;Ljava/time/ZoneOffset;)J", "", ApiSince=31)>]
member this.ToEpochSecond : Java.Time.LocalDate * Java.Time.ZoneOffset -> int64

Parameters

date
LocalDate

the local date, not null

offset
ZoneOffset

the zone offset, not null

Returns

the number of seconds since the epoch of 1970-01-01T00:00:00Z, may be negative

Attributes

Remarks

Converts this LocalTime to the number of seconds since the epoch of 1970-01-01T00:00:00Z. This combines this local time with the specified date and 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.

Java reference for java.time.LocalTime.toEpochSecond.

Applies to