Skip to content

Commit

Permalink
Fixing issue #13, refactoring, implementing internal structures for D…
Browse files Browse the repository at this point in the history
…NS module and improving DNS exports.
  • Loading branch information
Macmod committed Sep 10, 2024
1 parent 3e2ed14 commit 57fa19b
Show file tree
Hide file tree
Showing 11 changed files with 877 additions and 370 deletions.
14 changes: 14 additions & 0 deletions pkg/adidns/formats.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,17 @@ func MSTimeToUnixTimestamp(msTime uint64) int64 {

return unixTimestamp
}

func GetCurrentMSTime() uint32 {
baseTime := time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC)

currentTime := time.Now().UTC()

duration := currentTime.Sub(baseTime)

targetTime := duration.Hours()

msTime := uint32(targetTime) + uint32(3234576)

return msTime
}
Loading

0 comments on commit 57fa19b

Please sign in to comment.