From e87985ec1dcb69beedaf9f95e8e7aba14b7c08d6 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 09 十二月 2020 18:50:14 +0800
Subject: [PATCH] 2020-12-09 1.信息中心,增加下划线和点击Alter提醒详情。
---
HDL_ON/Common/Utlis.cs | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/HDL_ON/Common/Utlis.cs b/HDL_ON/Common/Utlis.cs
index 6283094..906212b 100644
--- a/HDL_ON/Common/Utlis.cs
+++ b/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,24 @@
}
/// <summary>
+ ///
+ /// </summary>
+ /// <param name="isMilliseconds">鏄惁寰</param>
+ /// <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 +333,5 @@
}
+
}
--
Gitblit v1.8.0