fix timestamp - 2
This commit is contained in:
parent
8e4bc7a02b
commit
e0b5b2498b
|
|
@ -513,12 +513,6 @@ func getLastMetrics(deveui string) OneMetric {
|
|||
s := strings.Split(scanner2.Text(), ",")
|
||||
fmt.Printf("BlaBla: %v, elements: %d\n", s, len(s))
|
||||
if (len(s) >= 12) && !(strings.HasPrefix(s[5], "_")) {
|
||||
t, err := time.Parse(time.RFC3339, s[5])
|
||||
if err != nil {
|
||||
fmt.Printf("error converting time: %s\n", s[5])
|
||||
continue
|
||||
}
|
||||
|
||||
res.BatteryPercent = strconv.Itoa(vbat2percent(s[len(s)-1]))
|
||||
res.BatteryPercentHTML = template.HTML(vbat2html(s[len(s)-1]))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue