110,534
社区成员
发帖
与我相关
我的任务
分享
byte[] b = {0x4a, 0xc4, 0xc5, 0x05,0,0,0,0 };
DateTime t = DateTime.Parse("1970-1-1");
long t2 = System.Net.IPAddress.HostToNetworkOrder(BitConverter.ToInt32(b, 0));
DateTime dt = t.AddSeconds(t2).ToLocalTime();
Console.WriteLine(dt);
byte[] b = { 0x4a, 0xc4, 0xc5, 0x05, 0, 0, 0, 0 };
DateTime dt = DateTime.FromBinary(BitConverter.ToInt64(b, 0));
Console.WriteLine(dt);