标签:
/// <summary> /// DateTime时间格式转换为Unix时间戳格式 /// </summary> /// <param name=”time”></param> /// <returns></returns> public static int ConvertDateTimeInt(System.DateTime time) { System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); return (int)(time - startTime).TotalSeconds; }
标签:
原文地址:http://www.cnblogs.com/rf813/p/5757490.html