ServiceClientGenerator.GeneratorHelpers.ConvertToUnixEpochSeconds C# (CSharp) Method

ConvertToUnixEpochSeconds() public static method

public static ConvertToUnixEpochSeconds ( System.DateTime dateTime ) : int
dateTime System.DateTime
return int
        public static int ConvertToUnixEpochSeconds(DateTime dateTime)
        {
            TimeSpan ts = new TimeSpan(dateTime.ToUniversalTime().Ticks - EPOCH_START.Ticks);
            return Convert.ToInt32(ts.TotalSeconds);
        }