diff options
| author | 2018-11-08 03:58:01 +0100 | |
|---|---|---|
| committer | 2018-11-08 03:58:01 +0100 | |
| commit | 4fd55daafe64f6101dde5c0a8a6887fef0ff0545 (patch) | |
| tree | df4b310bbc2222baa4d96bf4f9c3fd1f9c4c3358 | |
| parent | Use darwin tun on ios (diff) | |
| download | wireguard-go-4fd55daafe64f6101dde5c0a8a6887fef0ff0545.tar.xz wireguard-go-4fd55daafe64f6101dde5c0a8a6887fef0ff0545.zip | |
tai64n: use proper nanoseconds offset
The code before was obviously wrong.
Reported-by: Vlad Krasnov <vlad@cloudflare.com>
| -rw-r--r-- | tai64n/tai64n.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tai64n/tai64n.go b/tai64n/tai64n.go index 146126f..069d830 100644 --- a/tai64n/tai64n.go +++ b/tai64n/tai64n.go @@ -20,7 +20,7 @@ func Now() Timestamp { var tai64n Timestamp now := time.Now() secs := base + uint64(now.Unix()) - nano := uint32(now.UnixNano()) + nano := uint32(now.Nanosecond()) binary.BigEndian.PutUint64(tai64n[:], secs) binary.BigEndian.PutUint32(tai64n[8:], nano) return tai64n |
