wei
2020-12-08 62d77d3bb8e7215d9da9ecf6f5aeda0b69f805f8
HDL_ON/Common/Utlis.cs
@@ -2,6 +2,8 @@
using Shared;
using System.Text.RegularExpressions;
using System.Text;
using System.Collections.Generic;
using System.Collections;
namespace HDL_ON
{
@@ -303,6 +305,23 @@
      }
      /// <summary>
      /// 获取当前时间戳值
      /// </summary>
      /// <returns></returns>
      public static string GetTimestamp(bool isMilliseconds = true)
      {
         System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区
         if (isMilliseconds)
         {
            return ((long)(DateTime.Now - startTime).TotalMilliseconds).ToString(); // 相差秒数
         }
         else
         {
                return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 相差秒数
            }
      }
      /// <summary>
      /// 获取请求提交的语言参数
      /// </summary>
      public static string GetPostLanguageType()
@@ -313,4 +332,5 @@
      
   }
}