Menu

Problem setting RTC via web server

2021-06-04
2021-06-05
  • Paul Hallam

    Paul Hallam - 2021-06-04

    There appears to be a typo in the WEBSERVER_handle_admin7 function in the webserver.h file in the mySQLPLUS-118 firmware.
    The code to check the validity of the month value submitted is:
    rtc_loc.tm_mon = msg.toInt();
    if ( rtc_loc.tm_mon < 1 )
    {
    DebugPrintln(MONTHLESS1STR);
    rtc_loc.tm_mon = 1;
    }
    else if ( rtc_loc.tm_year > 12 )
    {
    DebugPrintln(MONTHGREATER12STR);
    rtc_loc.tm_mon = 12;
    }

    After 2012, any attempts to set the date and time via the web server, result in the month being set to 12. It should obviously check if rtc_loc.tm_mon > 12

     

    Last edit: Paul Hallam 2021-06-04
  • brownrb

    brownrb - 2021-06-05

    Hi Paul
    many thanks for the bug info, most appreciated. I have uploaded an update for the firmware

    Regards
    Robert

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.