ESP8266 Developer Zone The Official ESP8266 Forum 2016-11-29T17:02:18+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=2807 2016-11-29T17:02:18+08:00 2016-11-29T17:02:18+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2807&p=10725#p10725 <![CDATA[Re: ESP8266_RTOS_ALINK_DEMO怎样获取服务器时间(不是UTC)?]]> 获取服务器时间:
1.在服务器的下发的json包中有相对的时间,需要解析一下。如“time”:“1476169824”.
2.你可以自己打一个NTP服务器,可以获取服务器时间。
3.现在发布新的RTOS SDK,已经包括NTP,相对获取时间容易多了。

Statistics: Posted by ESP_Xutao — Tue Nov 29, 2016 5:02 pm


]]>
2016-09-23T20:58:54+08:00 2016-09-23T20:58:54+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2807&p=9928#p9928 <![CDATA[ESP8266_RTOS_ALINK_DEMO怎样获取服务器时间(不是UTC)?]]>
/***
* @desc: Get alink time. The SDK sync with server every 30 minutes
* or anytime if SDK is notified by the server if the timestamp is out order.
* @para: None
* @retc: utc time, the number of seconds since Epoth.
*/
unsigned int alink_get_time(void);
这个函数要转换比较麻烦。

Statistics: Posted by sdlo77 — Fri Sep 23, 2016 8:58 pm


]]>