From 7c3acf4baafa5e86e8ad8e6bc7cc5beeedf4abbc Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 18 Jul 2015 00:05:11 +0200 Subject: returning ms based timestamp diff --git a/src/helsinki.at/rhrdtime/rhrdtime.go b/src/helsinki.at/rhrdtime/rhrdtime.go index 9590e4a..bae588a 100644 --- a/src/helsinki.at/rhrdtime/rhrdtime.go +++ b/src/helsinki.at/rhrdtime/rhrdtime.go @@ -73,7 +73,7 @@ func getTimeUpdate() []byte { sEpoch := now.Unix() + int64(offset) week := uint8(math.Floor(math.Mod((((float64(sEpoch)+259200)/604800)+2), 4)) + 1) - update := timeUpdate{now.Unix(), offset, week} + update := timeUpdate{(now.Unix() * 1000) + int64(now.Nanosecond()/1000000), offset, week} update_json, err := json.Marshal(update) if err != nil { fmt.Println(err) -- cgit v0.10.2