[GH-ISSUE #1032] Backup of incoming SMS: "Date" header shows timestamp of local reception instead of sender's time #823

Open
opened 2026-02-26 01:32:00 +03:00 by kerem · 1 comment
Owner

Originally created by @mcg-android on GitHub (Sep 4, 2020).
Original GitHub issue: https://github.com/jberkel/sms-backup-plus/issues/1032

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 -d@1599071456.069  # incoming, date
    Wed Sep  2 20:30:56 CEST 2020
    
    $ date -d@1599071455.000  # 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?

Originally created by @mcg-android on GitHub (Sep 4, 2020). Original GitHub issue: https://github.com/jberkel/sms-backup-plus/issues/1032 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 -d@1599071456.069 # incoming, date Wed Sep 2 20:30:56 CEST 2020 $ date -d@1599071455.000 # 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?
Author
Owner

@kurahaupo commented on GitHub (Sep 28, 2020):

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.

<!-- gh-comment-id:699719896 --> @kurahaupo commented on GitHub (Sep 28, 2020): 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sms-backup-plus-jberkel#823
No description provided.