Class EpochExtensions
Provides extension methods for DateTimeOffset to convert to epoch time.
public static class EpochExtensions
- Inheritance
-
EpochExtensions
- Inherited Members
Methods
ToEpoch(DateTimeOffset, SubSecondPrecision)
Converts a DateTimeOffset value to epoch time with specified sub-second precision.
public static string ToEpoch(this DateTimeOffset value, SubSecondPrecision subSecondPrecision = SubSecondPrecision.Milliseconds)
Parameters
value
DateTimeOffsetThe DateTimeOffset value to convert.
subSecondPrecision
SubSecondPrecisionTimestamp sub-second precision.
Returns
- string
The epoch time representation of the DateTimeOffset value.