在Go中将Windows ticks转换为UNIX时间戳[重复]

This question already has an answer here:

I am trying to convert Windows Ticks into Go's native time.Time. Specifically, I want to convert 635885625204626270 into an UNIX timestamp. So far I only managed to adapt a PHP question, and could get as far as seconds, however I am now stuck here.

ticksInUnix := (635885625204626270 / 10000000) - 60*60*24*365*1970
t := time.Unix(ticksInUnix, 0)
</div>

After trying a lot to adapt answers in other programming languages, I found this to be the most accurate:

t := time.Unix(0, ((635885625204626270)-60*60*24*365*1970*10000000)*100)

It should be the most precise solution, as it does not perform divisions on the original tick count, and get to as accurate as microseconds (only if Windows can get that accurate on tick count, that is.)