Last active
August 29, 2015 14:07
-
-
Save kylebrandt/92671689da33c3075326 to your computer and use it in GitHub Desktop.
Convert Windows 100NS Epoch (Timestamp_Sys100NS) To a Unix Epoch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func TSys100NStoEpoch(nsec uint64) int64 { | |
//nsec is really 100*NS | |
//Got this constant from https://golang.org/src/pkg/syscall/ztypes_windows.go, not sure where it comes from, but seems to work | |
nsec -= 116444736000000000 | |
seconds := nsec / 1e7 | |
return int64(seconds) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, this helped me today.