From a49351cdf691a4c546d009c70df405fa6f3c2387 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 May 2016 14:20:58 +0200 Subject: [PATCH] fix jsontime + onlinestatus --- jsontime/jsontime.go | 2 +- models/nodes.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jsontime/jsontime.go b/jsontime/jsontime.go index e8b6ea6..355af67 100644 --- a/jsontime/jsontime.go +++ b/jsontime/jsontime.go @@ -5,7 +5,7 @@ import ( "time" ) -const TimeFormat = "2006-01-02T15:04:05" +const TimeFormat = "2006-01-02T15:04:05-0700" type Time struct { time time.Time diff --git a/models/nodes.go b/models/nodes.go index ec4c372..4083e95 100644 --- a/models/nodes.go +++ b/models/nodes.go @@ -74,6 +74,10 @@ func (nodes *Nodes) Update(nodeID string, res *data.ResponseData) { node.Lastseen = now + if node.Flags !=nil { + node.Flags.Online = true + } + // Update neighbours if val := res.Neighbours; val != nil { node.Neighbours = val