1

Different time zones

Тема: Different time zones

Hello,

We are having problems to consume the service, the problem is that we are making a request like the request that execute from wialonHosting, but the response is not the same.

Do you know why the response is not the same if the request is the same?


We ask wialon support, and his answer was.

It seems you have a different time zones, that's why with the same request you get the different data.
The second request you used has a -5 time zone in comparison with the first request.
Mexico","04:18:40"
Mexico","23:18:40"

"Total","","14:04:51"
"Total","","09:04:51"

So before you're executing the exec_report request you should set the time zone
https://sdk.wialon.com/wiki/en/sidebar/ … set_locale


but we do not know how to use this function  in javascript:

svc=render/set_locale&params={"tzOffset":<uint>,
                  "language":<text>,
                  "flags":<uint>,
                  "formatDate":<text>,
                  "density":<uint>}

We hope you could help with this. Thanks!

2

Different time zones

Re: Different time zones

Hello fvela,

You can fix this problem working with UTC dates. After, I worked with local time, but I changed to UTC dates because they dates causes problems in requests