fix jsontime + onlinestatus
This commit is contained in:
parent
9c66688e64
commit
a49351cdf6
|
@ -5,7 +5,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const TimeFormat = "2006-01-02T15:04:05"
|
const TimeFormat = "2006-01-02T15:04:05-0700"
|
||||||
|
|
||||||
type Time struct {
|
type Time struct {
|
||||||
time time.Time
|
time time.Time
|
||||||
|
|
|
@ -74,6 +74,10 @@ func (nodes *Nodes) Update(nodeID string, res *data.ResponseData) {
|
||||||
|
|
||||||
node.Lastseen = now
|
node.Lastseen = now
|
||||||
|
|
||||||
|
if node.Flags !=nil {
|
||||||
|
node.Flags.Online = true
|
||||||
|
}
|
||||||
|
|
||||||
// Update neighbours
|
// Update neighbours
|
||||||
if val := res.Neighbours; val != nil {
|
if val := res.Neighbours; val != nil {
|
||||||
node.Neighbours = val
|
node.Neighbours = val
|
||||||
|
|
Loading…
Reference in New Issue