1

How do i read the time and date format in the API.

Topic: How do i read the time and date format in the API.

Hello, im fairly new to Wialon API and i keep reading and practicing but theres something i dont fully understand and that is, how do i read/interpret the time?
For example here:

https://hst-api.wialon.com/wialon/ajax. … erval&
    params={
        "itemId":34868,
        "timeFrom":1364760000,
        "timeTo":1366487999,
        "flags":1,
        "flagsMask":65281,
        "loadCount":3
    }&sid=<your_sid>

Where do i get the "timeFrom" and "timeTo"? also how do i read that? at first i tought the 13 was supose to be like 1 pm but the more i try to understand it the less i get it, i tried looking at the documentation but no luck yet,

Im developing in php if that's important, any help is appreciated.

2

How do i read the time and date format in the API.

Re: How do i read the time and date format in the API.

jornadadgps22 wrote:

Hello, im fairly new to Wialon API and i keep reading and practicing but theres something i dont fully understand and that is, how do i read/interpret the time?
For example here:

https://hst-api.wialon.com/wialon/ajax. … erval&
    params={
        "itemId":34868,
        "timeFrom":1364760000,
        "timeTo":1366487999,
        "flags":1,
        "flagsMask":65281,
        "loadCount":3
    }&sid=<your_sid>

Where do i get the "timeFrom" and "timeTo"? also how do i read that? at first i tought the 13 was supose to be like 1 pm but the more i try to understand it the less i get it, i tried looking at the documentation but no luck yet,

Im developing in php if that's important, any help is appreciated.


Hello,
These values are indicated in UNIX time format -- https://en.wikipedia.org/wiki/Unix_time
For example, 1364760000 == GMT: Sunday, March 31, 2013 20:00:00
You can try to use any converter to check the value, e.g. https://www.epochconverter.com/

In Wialon API all time intervals should be indicated in UNIX time.

Unfortunately, I'm not familiar with PHP, but I suppose that there should be a methods to operate with such format.
Please, try to check PHP official documentation, maybe here -- https://www.php.net/manual/en/function.time.php

Thank you!

Anton Zinovyev
Technical Care Engineer (L1)
Wialon
3

How do i read the time and date format in the API.

Re: How do i read the time and date format in the API.

zant wrote:

Hello,
These values are indicated in UNIX time format --
For example, 1364760000 == GMT: Sunday, March 31, 2013 20:00:00
You can try to use any converter to check the value, e.g. https://www.epochconverter.com/

In Wialon API all time intervals should be indicated in UNIX time.

Unfortunately, I'm not familiar with PHP, but I suppose that there should be a methods to operate with such format.
Please, try to check PHP official documentation, maybe here -- https://www.php.net/manual/en/function.time.php

Thank you!

Thank you very much, i was very confused as to what those numbers meant