positions api error

Nrusingh7 years ago

Hi Anton,
I have two devices both are using protocol gt06. When I tries to get position details, I got for one device

http://<my server ip>:8082/api/positions?deviceId=1&from=2018-06-06T03:16:00.000Z&to=2018-06-06T03:50:17.194Z

but for the second device I use its deviceId, there is no results got and no errors just blank json

http://<my server ip>:8082/api/positions?deviceId=4&from=2018-06-06T03:16:00.000Z&to=2018-06-06T03:50:17.194Z

whereas in database in between those time interval records are stored.

I cant understand whats the problem,
Please suggest something.

Thank you

Anton Tananaev7 years ago

Are you sure you are using correct timezone?

Nrusingh7 years ago

Can you tell me how can I check my device timezone?
Using ST# command I got timezone as GMT:E8

Anton Tananaev7 years ago

What I meant is that in the database you probably see local time, but in your API request you are using UTC.

Nrusingh7 years ago

may be I am wrong using the time format
for example in server, the server time is like this
2018-06-06 12:40:34

so in my API request I used to call like this
2018-06-06T12:40:34.000Z

is this right?

Anton Tananaev7 years ago

No, it's not. I think you show read about ISO format.