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 8d280bc..f8c1bad 100644 --- a/models/nodes.go +++ b/models/nodes.go @@ -73,6 +73,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