AT+CIPSNTPTIME? //发生的指令
+CIPSNTPTIME:Tue Oct 19 15:17:56 2021 //回复的数据
//接受数据缓存
char* recvStrBuf = "+CIPSNTPTIME:Tue Oct 19 15:17:56 2021";
char* weekStr;
char* monthStr;
int day,hour,minute,second,year;
sscanf(recvStrBuf,"","+CIPSNTPTIME:%s %s %d %d:%d:%d %d"
weekStr,monthStr,&day,&hour,&minute,&second,&year);
参考链接
C语言干货-如何快速解析字符串_哔哩哔哩_bilibilihttps://www.bilibili.com/video/BV1af42127ve/?spm_id_from=333.337.search-card.all.click&vd_source=e821a225c7ba4a7b85e5aa6d013ac92e
C语言中sscanf函数的简明教程_sscanf hh-CSDN博客https://blog.csdn.net/centralunit/article/details/112938407
特此记录
anlog
2024年5月12日