服务端相关代码也合并到仓库
This commit is contained in:
1 parent
fef54e1f0f
commit
879b72e21a
32 files changed
+3626
-1
No files matched your search
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.Utils
|
||||
{
|
||||
public class TimeUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间戳转为C#格式时间
|
||||
/// </summary>
|
||||
/// <param name="timeStamp"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime StampToDateTime(int timeStamp)
|
||||
{
|
||||
DateTime dateTimeStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||
long lTime = long.Parse(timeStamp + "0000000");
|
||||
TimeSpan toNow = new TimeSpan(lTime);
|
||||
return dateTimeStart.Add(toNow);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user