发布:2023/12/7 15:53:03作者:大数据 来源:大数据 浏览次数:474
unix时间转换,.net core或C#
publicDateStr为发布时间long
var d0 = DateTimeOffset.FromFileTime(pubicDateStr).DateTime;
var d1 = DateTimeOffset.FromUnixTimeMilliseconds(pubicDateStr).DateTime;
var d2 = DateTimeOffset.FromUnixTimeSeconds(pubicDateStr).DateTime;
long time0 = DateTimeOffset.Now.ToFileTime();
long time1 = DateTimeOffset.Now.ToUnixTimeMilliseconds();
long time2 = DateTimeOffset.Now.ToUnixTimeSeconds();
unix时间在线转换:
https://tool.lu/timestamp/
© Copyright 2014 - 2024 柏港建站平台 ejk5.com. 渝ICP备16000791号-4