| 1234567891011121314151617181920 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Azylee.Core.DataUtils.DateTimeUtils
- {
- public class TimeStampTool
- {
- /// <summary>
- /// 获取时间戳
- /// </summary>
- /// <returns></returns>
- public static long Get()
- {
- TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
- return (long)ts.TotalSeconds;
- }
- }
- }
|