public static GetEpochSeconds ( this current ) : long | ||
current | this | the date and time to convert |
return | long |
public static long GetEpochSeconds(this DateTime current)
{
return (long)current.Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds;
}