This commit is contained in:
Joerg Lehmann 2021-04-17 11:20:29 +02:00
parent 48f64466fc
commit 4fd84c74fb
1 changed files with 2 additions and 2 deletions

View File

@ -430,9 +430,9 @@ func getLastMetrics(deveui string) OneMetric {
s := strings.Split(scanner.Text(), ",") s := strings.Split(scanner.Text(), ",")
fmt.Printf("BlaBla: %v\n", s) fmt.Printf("BlaBla: %v\n", s)
if (len(s) >= 12) && !(strings.HasPrefix(s[3], "_")) { if (len(s) >= 12) && !(strings.HasPrefix(s[3], "_")) {
t, err := time.Parse(time.RFC3339, s[5]) t, err := time.Parse(time.RFC3339, s[3])
if err != nil { if err != nil {
fmt.Printf("error converting time: %s\n", s[5]) fmt.Printf("error converting time: %s\n", s[3])
continue continue
} }