AnsweredAssumed Answered

Is there a reason why I cant change the time value from a cgi function?

Question asked by Jeremy Sanchez on Oct 12, 2009
Latest reply on Oct 22, 2009 by Jeremy Sanchez

I am using the following code to change the time value in a cgi function but the webserver stops working after i call the function. Any clues about why is this happening?



    TIME_STRUCT  MQX_time;
    DATE_STRUCT  DateStruct;
    DateStruct.YEAR = year;
    DateStruct.MONTH = month;
    DateStruct.DAY = day;
    DateStruct.HOUR = hour;
    DateStruct.MINUTE = minute;
    DateStruct.SECOND = second;
    DateStruct.MILLISEC = millisec;

_time_from_date(&DateStruct, &MQX_time);//Convierte la fecha a tiempo MQX
_time_set (&MQX_time); //Actualiza el tiempo MQX con la fecha actual
_rtc_sync_with_mqx ( FALSE ); //Sincroniza RTC con MQX (MQX es la Fuente)