Problem about timestamp in SOS api

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem about timestamp in SOS api

tajse
Hi all,

Now I'm getting data from SOS api.  When I get a observation, SOS api like this

"firstValue": {
"timestamp": 1490788800000,
"value": 92
},
"lastValue": {
"timestamp": 1490788800000,
"value": 92
},


What's timestamp format? And how can I transfer it to normal time format?

Thanks a lot!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem about timestamp in SOS api

Henning Bredel-2
Hi,

it is a Unix timestamp [0]  (millis since 1970). 

How to convert depends on the language you're using. In Java it is just

  new Date (millis);

Best

  Henning


Am 03.04.2017 11:56 schrieb "tajse" <[hidden email]>:
Hi all,

Now I'm getting data from SOS api.  When I get a observation, SOS api like
this

"firstValue": {
"timestamp": 1490788800000,
"value": 92
},
"lastValue": {
"timestamp": 1490788800000,
"value": 92
},


What's timestamp format? And how can I transfer it to normal time format?

Thanks a lot!



--
View this message in context: http://sensorweb.forum.52north.org/Problem-about-timestamp-in-SOS-api-tp4028907.html
Sent from the 52° North - Sensor Web Community Forum mailing list archive at Nabble.com.
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines

_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem about timestamp in SOS api

tajse
Hi Henning,

I got it, thank you!
Loading...