C# 后端方法返回时间戳
/// <summary>/// 时间戳/// </summary>/// <returns></returns>public static long GetCurrentUinxTime(){DateTime currentDate = DateTime.Now;//当前时间//转化为时间戳DateTime localTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));return long.Parse((currentDate - localTime).TotalSeconds.ToString().Split(',')[0]);}