/// <summary>
/// datetime转换为unixtime
/// </summary>
/// <param name="time">要转换的时间</param>
/// <returns></returns>
private int ConvertDateTimeInt(DateTime time)
{
DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
return (int)(time - startTime).TotalSeconds;
}