Closed
Description
Right now, the conversion from influxdb::query::Timestamp::Microseconds to chrono::Datetime is incorrect:
Timestamp::Microseconds(mis) => {
let nanos = mis / 10000;
Utc.timestamp_nanos(nanos.try_into().unwrap())
}
In this case, nanos
should be calculated by multiplying mis by MICROS_PER_NANO, which equals 1000.
p.s. If I understand correctly, this bug affects the correctness of timestamps stored in the influxdb and, therefore, if one uses microseconds precision to store the data - the time of the data in the database would be incorrect.
Metadata
Metadata
Assignees
Labels
No labels