mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-03-22 22:57:20 +08:00
添加项目文件。
This commit is contained in:
29
CoreCms.Net.Utility/Helper/DateHelper.cs
Normal file
29
CoreCms.Net.Utility/Helper/DateHelper.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms.Net *
|
||||
* Web: https://CoreCms.Net *
|
||||
* ProjectName: 核心内容管理系统 *
|
||||
* Author: 大灰灰 *
|
||||
* Email: JianWeie@163.com *
|
||||
* CreateTime: 2020-07-17 0:50:39
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace CoreCms.Net.Utility.Helper
|
||||
{
|
||||
public class DateHelper
|
||||
{
|
||||
public static DateTime StampToDateTime(string time)
|
||||
{
|
||||
time = time.Substring(0, 10);
|
||||
double timestamp = Convert.ToInt64(time);
|
||||
System.DateTime dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
dateTime = dateTime.AddSeconds(timestamp).ToLocalTime();
|
||||
return dateTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user