EG25 doesn't return local time in +CCLK

A ModemManager user has reported that the times reported in +CCLK by a Quectel EG25 (EG25GGBR07A07M2G) and a Telit HE910 are different, see

It looks like the Quectel modem is reporting the time as “GMT time” plus “timezone offset” (and so the user should take care of computing what the local time is). The Telit modem is reporting the time as “local time” plus “timezone offset”, which is also in line with the approach used in ISO8601.

Looking at the 3GPP specs for this command, an example is given:

6th of May 1994, 22:10:00 GMT+2 hours equals to “94/05/06,22:10:00+08”

The way this example should be interpreted, in my opinion, is that 22:10:00 is the local time in the GMT+2 timezone, so the time string reported by CCLK should indeed be 22:10:00+08 (so the Telit implementation would be ok, not the Quectel one).

Dear Sir,
Thanks for your inquiry in Quectel forum.
For your issue, you can try to set AT+CTZU=3 which can enable automatic time zone update via NITZ and update LOCAL time to RTC. Thanks!

Hey @kyson. I’m not totally sure what you’re suggesting would make any difference; the problem is not that the time isn’t synchronized; it is synchronized. It just looks like the format of the time is wrong, as +CCLK seems to be giving GMT+offset instead of localtime+offset.

Dear Sir,
Have you try it ?
AT+CCLK is to set and query the real time clock(RTC) of the module, while AT+CTZU can update Local time to RTC, it cannot solve your issue?? Please try to test it. Thanks!

Please note, after set AT+CTZU command, you should reboot the module. Thanks!

@Kyson I believe I may not be explaining myself completely well. I don’t think the issue is due to a lack of synchronization between the device RTC and the network clock, that is correctly done for what I can tell. I think the issue is with how that time is being represented in the +CCLK output.

I personally don’t have a EG25 myself, but I’ve tried to reproduce the problem with a EC25-EC (EC25ECGAR06A05M1G) and even after running the CTZU command, the issue is clearly seen.

At around 14:41 CEST in Spain, I run AT+CCLK? in the EC25-EC modem, and I get:

+CCLK: "20/06/29,12:41:07+08"

The time given by the +CCLK command is returning the date, the UTC time (12:41:07) and the timezone offset (+08). This means that in this case, if I want to know what is my local time, I need to do the time+offset computation myself (localtime=UTC+offset=12:41+(08*15min)=14:41)

In modems from other manufacturers, and I believe also according to 3GPP specs (and in line with ISO8601), the +CCLK command should return already the local time (not the UTC time) and the time offset. E.g. the response in this case should have been:

+CCLK: "20/06/29,14:41:07+08"

I’d like to understand whether this is an implementation detail in Quectel modems (and only in Quectel modems), because if so, I’d need to hack around the Quectel plugin in ModemManager to “undo” this and report localtime+offset in the ModemManager APIs (which reports time in ISO8601 format).

Have you tried “AT+CTZU=3” ?,
That command will resolve your problem. Normally, CCLK returns UTC time but when you use “AT+CTZU=3”, it will return local time.

I had tried that setting before, but I was told to reset the modem after setting it, and I didn’t remember that ModemManager runs CTZU=1 during modem startup, so the CTZU=3 setting went away after the reboot. If I don’t reset the modem so that MM doesn’t change the setting, the +CCLK command does return localtime instead of UTC time, thanks!

I assume the CTZU=3 setting is a Quectel-specific thing?

I’ll modify the Quectel plugin so that it runs CTZU=3 instead of CTZU=1 during startup, that should solve the problem completely.

@muratdemirtas @Kyson thanks for the help with the problem!

// running at around 11:26 CEST
+CCLK: "20/06/30,09:26:26+08"
+CCLK: "20/06/30,11:26:35+08"

Yes, it is.
And that command, CTZU=3 is not documented yet. Best regards

Fixed in ModemManager with merge request

is there any function to do this in opencpu mode ?

If you want to use it in Open mode, it is better to create another new topic in Open-solution subjects. Thanks!

1 Like

One user reported incorrect time info when CTZU=3 is used:

P1001229-S00000114:~$ mmcli -m 0 --command='AT+CTZU=1'
response: ''
P1001229-S00000114:~$ mmcli -m 0 --command='AT+CCLK?'
response: '+CCLK: "21/04/12,16:37:17-28"'
P1001229-S00000114:~$ mmcli -m 0 --command='AT+CTZU=3'
response: ''
P1001229-S00000114:~$ mmcli -m 0 --command='AT+CCLK?'
response: '+CCLK: "23/02/24,01:37:36-28"'

The returned time is sometime in 2023.

Here’s the ModemManager bug reference for context:

@muratdemirtas @Kyson any idea why this is happening?