BitSharper.Common.UnixTime.ToUnixTime C# (CSharp) Метод

ToUnixTime() публичный статический Метод

Converts a DateTime to unix time. Unix time is the number of seconds between 1970-1-1 0:0:0.0 (unix epoch) and the time (UTC).
public static ToUnixTime ( System.DateTime time ) : ulong
time System.DateTime The date time to convert to unix time
Результат ulong
        public static ulong ToUnixTime(DateTime time)
        {
            return (ulong) (time.ToUniversalTime() - _unixEpoch).TotalSeconds;
        }