Skip to content

Commit

Permalink
Print correted date instead of offset
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc committed Apr 4, 2018
1 parent 382193d commit 9bf7f9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htpdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ func main() {
sumT += theta / delta
sumD += 1 / delta
}
fmt.Printf("offset %.5f sec\n", sumT/sumD)
offset := time.Duration(1e9 * sumT / sumD)
fmt.Println(time.Now().Add(offset).Format(time.RFC3339Nano))
}

0 comments on commit 9bf7f9e

Please # to comment.