[PATCH] Include minutes in SMS timezone field

Amol Lad Amol.Lad at 4rf.com
Thu Sep 19 11:26:01 UTC 2019


Hi Akeksander,

Your proposal seems reasonable. Please find below merge request for review:

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/172

Thanks
Amol


The information in this email communication (inclusive of attachments) is confidential to 4RF Limited and the intended recipient(s). If you are not the intended recipient(s), please note that any use, disclosure, distribution or copying of this information or any part thereof is strictly prohibited and that the author accepts no liability for the consequences of any action taken on the basis of the information provided. If you have received this email in error, please notify the sender immediately by return email and then delete all instances of this email from your system. 4RF Limited will not accept responsibility for any consequences associated with the use of this email (including, but not limited to, damages sustained as a result of any viruses and/or any action or lack of action taken in reliance on it).-----Original Message-----
From: Aleksander Morgado <aleksander at aleksander.es>
Sent: Thursday, 19 September 2019 1:16 PM
To: Amol Lad <Amol.Lad at 4rf.com>
Cc: ModemManager (development) <modemmanager-devel at lists.freedesktop.org>
Subject: Re: [PATCH] Include minutes in SMS timezone field

Hey,

> Comment in libmm-glib/mm-sms.c :mm_sms_get_timestamp() states that the time returned is ISO8601 complaint. However, ISO8601 mandates that year must be in YYYY format and not just YY. What we are showing in timestamp field is YYMMDDHHMMSS+ZZ. This is more in-line with the 7 octet timestamp received in SMS PDU and also shown using AT Command:
>
> AT+CMGR=1
> +CMGR: "REC UNREAD","+85291234567",,"07/02/18,00:05:10+32"
>
> OK
>
> Now, we cannot do YYYY as SMS PDU only has YY.
>

I don't think there will be many stored SMS from last century, so let's assume that if we get only a 2-digit year value, we can prepend "20" to that value to get the 4-digit year value.

> More important, you will notice in above AT command output that the
> timezone is "+32" which is actually "Quarters" and not "Hours" as MM
> is showing now
>
> So we've below ways to fix this:
>
> 1) change sms_decode_timestamp() to populate +ZZ as "quarters" and not "hours". This then becomes in-line with AT command reporting.
> 2) change format to YYMMDDHHMMSS+HHMM
>
> So what is the preference?
>

Let's do ISO8601 in long format (with field separators), which is really readable, what do you think? e.g. 2019-09-19T09:45:00+0200

Cheers!

--
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list