sms-backup-plus icon indicating copy to clipboard operation
sms-backup-plus copied to clipboard

Backup of incoming SMS: "Date" header shows timestamp of local reception instead of sender's time

Open mcg-android opened this issue 4 years ago • 1 comments

Using SMS Backup+ version 1.5.11 installed from F-Droid (on /e/OS 0.10-o-2020081968665), I can observe:

  • The RFC822-type messages created as backup of SMS messages carry a "Date" header which apparently represents the contents of the "date" column of table "sms" in "mmssms.db".
  • For incoming SMS messages, the remote side's timestamp is stored in the "date_sent" column of table "sms" in "mmssms.db".
  • An example:
    X-smssync-version: 1576
    Date: Wed, 02 Sep 2020 20:30:56 +0200
    
    sqlite> select type, date, date_sent from sms where _id=10;
    type|date|date_sent
    1|1599071456069|1599071455000
    
    $ date [email protected]  # incoming, date
    Wed Sep  2 20:30:56 CEST 2020
    
    $ date [email protected]  # incoming, date_sent
    Wed Sep  2 20:30:55 CEST 2020
    

In email messages, the "Date" header contains a timestamp representing the point in time a message was written (not the point in time it was received).

So to me this looks like unintended, wrong behaviour. I think the "Date" header in the backup messages should show the time the message was sent, i.e. for incoming SMS messages the value of the "date_sent" column.

In case the current behaviour is intended and/or won't get changed by default, could you make the suggested behaviour an option?

mcg-android avatar Sep 04 '20 12:09 mcg-android

Agreed, but @jberkel will have to make the final call.

I would hope that both timestamps could be encoded in the RFC822 message headers, with the received timestamp for incoming messages and the network-acceptance timestamp for outgoing messages perhaps included in X-Received-Date: headers or even embedded in synthesised Received: headers.

kurahaupo avatar Sep 28 '20 01:09 kurahaupo