更新时间:2023-01-22 12:19:15
C#ticks是自午夜0001-01-01 00:00:00
开始的滴答数(每个滴答是1/10000000秒),而UNIX timestamp是自开始以来的秒数. UNIX时代(1970-01-01 01:00:00
),因此所需的结果是$seconds = 634942626000000000/10000000 - $number_of_seconds
,其中$number_of_seconds
是0001-00-01 00:00:00
和1970-01-01 01:00:00
之间的秒数.因此,您现在所要做的就是确定$number_of_seconds
等于什么.
C# ticks is a number of ticks since midnight 0001-01-01 00:00:00
(every tick is 1/10000000 of second) and UNIX timestamp is number of seconds since beginning of the UNIX epoch (1970-01-01 01:00:00
), so desired result is $seconds = 634942626000000000/10000000 - $number_of_seconds
, where $number_of_seconds
is seconds between 0001-00-01 00:00:00
and 1970-01-01 01:00:00
. So, all you need now is to determine what $number_of_seconds
is equals.
Update: this is how to do it in C# : How to convert a Unix timestamp to DateTime and vice versa?
更新2 使用此简单脚本 http://hastebin.com/lefiyiheju. mel 确定$number_of_seconds
是62136892800,但我不知道它是否准确
Update 2 Using this simple script http://hastebin.com/lefiyiheju.mel determined that $number_of_seconds
is 62136892800, but I don't know if it is much accurate