AT+CCLK weekday bug and workaround

Hi,

When using AT+CCLK to set the time to just before midnight, the weekday is correct, and when it passes to the next day, it is incremented correctly.

The problem is when I set the time to Saturday night, just before midnight, the weekday is 6, until time passes to the next day, then weekday is incremented to 0.
The problem is also when I set the time to Sunday night, just before midnight, the weekday is 7, until time passes to the next day, then weekday is incremented to 0.

To avoid this problem, I just re send the time using the AT+CCLK command (with the time that I have just read) when weekday is 0.

void GetTime(adl_rtcTime_t* p_Time)
{
	// Get time
	adl_rtcGetTime(p_Time);
	// Check weekday
	if (p_Time->WeekDay == 0)
	{
		// Workaround
		ascii l_Cmd[32];
		wm_sprintf(l_Cmd, "AT+CCLK=\"%02d/%02d/%02d,%02d:%02d:%02d\"",
				p_Time->Year - 2000, p_Time->Month, p_Time->Day,
				p_Time->Hour, p_Time->Minute, p_Time->Second);
		adl_atCmdCreate ( l_Cmd, ADL_AT_PORT_TYPE(ADL_PORT_UART1, FALSE), 0, NULL );

		// Reload
		adl_rtcGetTime(p_Time);
	}
}

Is this bug will be corrected in the next firmware ?

I notice the problem with R7.43, R7.44 and R7.45 firmware. I didn’t test the R7.46 firmware…

Thanks

Hi David,

This is a known problem and a tracker already exists for the same.Will update you on this when the tracker is resolved.

Thanks !

It would be really, really, really useful if these “trackers” were visible to users :exclamation:

+1

I aggree. Because i have a similar problem with weekOfDay parameter. i solved it somehow but i would want to track it.

Hi,

The tracker is fixed and the problem is corrected in framework 2.51(OS 6.41,firmware R7.51).

Thanks.