OffsetDateTime.ToEpochSecond Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z.
[Android.Runtime.Register("toEpochSecond", "()J", "", ApiSince=26)]
public long ToEpochSecond ();
[<Android.Runtime.Register("toEpochSecond", "()J", "", ApiSince=26)>]
member this.ToEpochSecond : unit -> int64
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 allows this date-time to be converted to a value of the ChronoField#INSTANT_SECONDS epoch-seconds
field. This is primarily intended for low-level conversions rather than general application usage.
Java documentation for java.time.OffsetDateTime.toEpochSecond()
.
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.