tsdb: add support for more data types when converting sql time column to epoch (ms)

This commit is contained in:
Marcus Efraimsson
2018-04-10 10:33:23 +02:00
parent b610f77bd6
commit a314890f89
3 changed files with 192 additions and 25 deletions
+5
View File
@@ -96,5 +96,10 @@ func EpochPrecisionToMs(value float64) float64 {
return float64(value * 1e3)
}
s := strconv.FormatFloat(value, 'f', -1, 64)
if len(s) == 19 {
return float64(value / 1e6)
}
return float64(value)
}