ningshuxia
2022-11-14 e4680615a852b2eb115b32c8bcbc3b788c3f9ef4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.DataDockingApi
{
    /// <summary>
    /// 时间辅助类
    /// </summary>
    internal class TimeHelper
    {
        /// <summary>
        /// 
        /// </summary>
        public static DateTime Convert(long timeStamp)
        {
            DateTime defaultTime = new DateTime(1970, 1, 1, 0, 0, 0);
            long defaultTick = defaultTime.Ticks;
            long timeTick = defaultTick + timeStamp * 10000;
            DateTime dt = new DateTime(timeTick).AddHours(8);
            return dt;
        }
 
 
 
    }
}