Show all the wrong time in influx

#1

When loading some data into the influxdb with the current timestamp, then when you query the data, they all display as something like “1970-01-01T00:00:01.555969436”. e.g. below:
1970-01-01T00:00:01.555969415Z 6.253934065840877

1970-01-01T00:00:01.555969416Z 6.416320504546992

1970-01-01T00:00:01.555969417Z 6.579798566743315

1970-01-01T00:00:01.555969418Z 6.744318455428433

1970-01-01T00:00:01.555969419Z 6.909830056250524

1970-01-01T00:00:01.55596942Z 7.076282952772629

1970-01-01T00:00:01.555969421Z 7.243626441830011

1970-01-01T00:00:01.555969422Z 7.411809548974793

1970-01-01T00:00:01.555969423Z 7.580781044003322

1970-01-01T00:00:01.555969424Z 7.750489456561347

1970-01-01T00:00:01.555969425Z 7.920883091822401

1970-01-01T00:00:01.555969426Z 8.091910046234553

1970-01-01T00:00:01.555969427Z 8.263518223330696

1970-01-01T00:00:01.555969428Z 8.435655349597688

1970-01-01T00:00:01.555969429Z 8.608268990399342

1970-01-01T00:00:01.55596943Z 8.781306565948528

1970-01-01T00:00:01.555969431Z 8.954715367323466

1970-01-01T00:00:01.555969432Z 9.128442572523417

1970-01-01T00:00:01.555969433Z 9.302435262558744

1970-01-01T00:00:01.555969434Z 9.476640437570556

1970-01-01T00:00:01.555969435Z 9.651005032974991

1970-01-01T00:00:01.555969436Z 9.825475935627164

#2

any quick fix on this?

#3

nvm, I have to convert the timestamp to a nanosecond. (*1e+9)

#4

or the other way to do it is to set the time_precision=‘s’ in client.write_points(points, time_precision=‘s’) when you insert the data.

#5

hi @xsqian ,

thanks for the feedback :slight_smile: