yats.git

commit 33b031596bf569254aebd7888d20aefd1e642fdc

Author: Paolo Lulli <paolo@lulli.net>

Debug

 server/rest/rest-metric.go | 8 ++++----


diff --git a/server/rest/rest-metric.go b/server/rest/rest-metric.go
index 7c18fcb2fff8c459809b4adeb81cef626021abce..03627d9f1714e0578c7a70ffa0556a966c684d94 100644
--- a/server/rest/rest-metric.go
+++ b/server/rest/rest-metric.go
@@ -105,11 +105,11 @@ 			metricsPack = db.MetricsFrom(db.Session, clientCN, metric.Name, string(timeAsBytes), 100)
 		} else if metric.From != 0 {
 			fromUnixTimeUTC := time.Unix(metric.From, 0)
 			toUnixTimeUTC := time.Unix(metric.To, 0)
-			fromInBytes, _ := fromUnixTimeUTC.UTC().MarshalText()
+			fromInBytes := fromUnixTimeUTC.UTC().String()
 			toInBytes, _ := toUnixTimeUTC.UTC().MarshalText()
-			fmt.Printf("PASSING HERE, from %s to %s \n", fromInBytes, toInBytes)
-			LOG.Printf("PASSING HERE, from %s to %s\n", fromInBytes, toInBytes)
-			metricsPack = db.MetricsBetween(db.Session, clientCN, metric.Name, string(fromInBytes), string(toInBytes), 100)
+			fmt.Println("PASSING HERE, from:" + fromInBytes + " to:" + string(toInBytes))
+			//LOG.Printf("PASSING HERE, from %s to %s\n", fromInBytes, toInBytes)
+			metricsPack = db.MetricsBetween(db.Session, clientCN, metric.Name, fromInBytes, string(toInBytes), 100)
 		}
 		c.IndentedJSON(http.StatusAccepted, gin.H{"ret": "OK", "data": metricsPack})
 	}