Akamai.Utils.ExtensionMethods.GetEpochSeconds C# (CSharp) Method

GetEpochSeconds() public static method

determine the number of seconds since unix epoch
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;
        }