ESP8266 Developer Zone The Official ESP8266 Forum 2015-06-24T11:38:26+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=634 2015-06-24T11:38:26+08:00 2015-06-24T11:38:26+08:00 https://bbs.espressif.com:443/viewtopic.php?t=634&p=2383#p2383 <![CDATA[Re: Bug in SNTP?]]>
Thanks for your reporting !

This is not a bug.

strlen is 25 because we have a line break symbol (\n) there, if you need to use the length, please try strlen() - 1

Statistics: Posted by ESP_Faye — Wed Jun 24, 2015 11:38 am


]]>
2015-06-21T06:35:22+08:00 2015-06-21T06:35:22+08:00 https://bbs.espressif.com:443/viewtopic.php?t=634&p=2331#p2331 <![CDATA[Bug in SNTP?]]>
possible bug in SNTP

Source:

#if DEBUG>5
os_printf("String: %s Strlen: %d\n", sntp_get_real_time(current_stamp),strlen(sntp_get_real_time(current_stamp)) );
#endif

Result on Debug Terminal:

String: Sat Jun 20 20:25:54 2015
Strlen: 25

Bug: String should be 24 chars long, char 25 is unwanted carrier return?

Statistics: Posted by SpenZerX — Sun Jun 21, 2015 6:35 am


]]>