Inserting with precision=m "Time outside range"

I want to store my timestamps with minute precision. I set the precision to m but when I try to insert I get this error:
insert valores,id_variable=-2 valor=23.4 1488327378
ERR: {“error”:“unable to parse ‘valores,id_variable=-2 valor=23.4 1488327378’: time outside range -9223372036854775806 - 9223372036854775806”}

Which is right format to insert the timestamp with minutes precision?

Thanks

Hello @acastro,
Welcome. Have you tried specifying the precision first?

Yes, I set “-precision m”

Somehow this is not documented (or the documentation cannot be found via Google), but apparently you need to divide the (unix)timestamp by the precision.
The default is ns, so you need to divide by 60000000000 to get to minutes.

In your case as the timestamp “1488327378” (2017-03-01T00:16:18+00:00) is in seconds, you need to divide that by 60 to 24805456 (and truncate to lose the 18 seconds) and use that as the timestamp.

I found your question as I was running into this issue as well but was able to determine the solution for this. (Which in hindsight seems ‘logical’ as it is one of the few ways to make sure no higher precision values are entered.) So decided to post the solution so others might be helped.