You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrong index when parsing return text from AT+CCLK command.
The response is "+CCLK: YY/MM/DD HH:MM:SS", so there is one space before year.
The code at line 831 will concatenate "20" with " 23" and convert to int, then the result will be always 20 instead of 2023. unsigned int yy = ("20" + dateTime.date.substring(0, index)).toInt();
Solution:
Change starting index to 1. unsigned int yy = ("20" + dateTime.date.substring(1, index)).toInt();
The text was updated successfully, but these errors were encountered:
Error:
Always return 20 as year.
Cause:
unsigned int yy = ("20" + dateTime.date.substring(0, index)).toInt();
Solution:
Change starting index to 1.
unsigned int yy = ("20" + dateTime.date.substring(1, index)).toInt();
The text was updated successfully, but these errors were encountered: