using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace efunbox_xyyf_windows.util { public class DateUtil { public static string getNowTimeStamp(bool isMillisecond = true) { if (isMillisecond) { //返回毫秒 return ((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000).ToString(); } else { //返回秒 return ((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000).ToString(); } } } }