This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC3235SF:当器件在 Wifi-HTTP 代码中作为访问点运行时、如何获取 localtime 值。

Guru**** 2016940 points
Other Parts Discussed in Thread: CC3235SF
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1419421/cc3235sf-how-can-i-get-the-localtime-value-when-the-device-is-running-as-acces-point-in-wifi-http-code

器件型号:CC3235SF

工具与软件:

我无法在 portable_CC3235SF_LAUNCHXL_tirtos7_ticlang 中获取日期和时间信息。 我想在 localtime 代码中使用方法、但我无法获取它。


int timeZoneValue = 180;// GMT+3
ClockSync_setTimeZone (timeZoneValue);

struct tm netTime;
int32_t status;

//获取当前时间
status = ClockSync_Get (&netTime);

//检查是否已成功检索时间
如果(STATUS == 0 || STATUS == CLOCKSYNC_ERROR_INTERVAL){
Display_printf (display、0、0、"Local time =%s\n\r"、asctime (&netTime));
其他{
Display_printf (display、0、0、"Error Geting Time =%d\n\r"、status);
}

这样、我想将时间信息打印到串行端口、但收到"getting time="-202"错误。