SimpleMobileTools / Simple-SMS-Messenger

An easy and quick way of managing SMS and MMS messages without ads.
https://www.simplemobiletools.com
GNU General Public License v3.0
608 stars 218 forks source link

Timestamp #184

Open vvvilife opened 3 years ago

vvvilife commented 3 years ago

When sending a message, the timestamp is correct. when receiving a message back from the recipient, it is 3 hours behind, making the conversation out of order.

tibbi commented 3 years ago

What time zone are you in? Isn't the offset around 3 hours?

vvvilife commented 3 years ago

I'm in EST, so is the recipient (although that shouldn't matter as the timestamp should be when it was received my time anyways).

Sent from ProtonMail mobile

-------- Original Message -------- On Aug 29, 2021, 10:07, Tibor Kaputa wrote:

What time zone are you in? Isn't the offset around 3 hours?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

tibbi commented 3 years ago

hm okay, will keep an eye on it. Do other apps work well?

vvvilife commented 3 years ago

yes, I switched off simple SMS to textra because of this and it was fine. they recently added ads though so I switched back. can attach screenshots if need be

Sent from ProtonMail mobile

-------- Original Message -------- On Aug 29, 2021, 12:07, Tibor Kaputa wrote:

hm okay, will keep an eye on it. Do other apps work well?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

tibbi commented 3 years ago

no need for screenshots, Ill take a look at it. It works to others just fine though.

tibbi commented 3 years ago

can you maybe test Pulse app? They use the same library we do.

vvvilife commented 3 years ago

one last note, grapheneOS is the OS on my phone. not sure why that would matter if other SMS apps work but figured I'd let you know

Sent from ProtonMail mobile

-------- Original Message -------- On Aug 29, 2021, 12:12, Tibor Kaputa wrote:

no need for screenshots, Ill take a look at it. It works to others just fine though.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

vvvilife commented 3 years ago

will do, will get back to you shortly.

Sent from ProtonMail mobile

-------- Original Message -------- On Aug 29, 2021, 12:13, Tibor Kaputa wrote:

can you maybe test Pulse app? They use the same library we do.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

TheMagicJesus commented 3 years ago

Same issue but received SMS timestamp is 1 hr earlier than real time.

Edit: Installed Pulse SMS by Maple Media and SMS messages showed the correct timestamp on receipt. May not be a library issue

TheMagicJesus commented 2 years ago

Issue persists

TheMagicJesus commented 2 years ago

Further testing shows that MMS messages(.gif , other images) have the correct time stamp

TheMagicJesus commented 2 years ago

@tibbi Finally went through the code and might've found the source of the issue. app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt On text receipt date is provided by the lower of the system time or the time provided by the SMSC(Short Message Service Center). The issue arises when the users SMSC time is lower than the system time for whatever reason(whether it be because the closest SMSC is in a different time zone, or the user/SMSC have failed to update their clocks, etc). In inspecting messages on other messaging applications I now see that this issue applies to other applications as well but they either default the receive date to the system time or have some other system in place. I am unaware of how to determine directly what SMSC directed the message or how to contact them so that they might change their clocks.

tibbi commented 2 years ago

well, and how to fix it?

TheMagicJesus commented 2 years ago

Easiest fix would be changing https://github.com/SimpleMobileTools/Simple-SMS-Messenger/blob/2b65ebceff94819a0c7c56ce5b64628f8c985944/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsReceiver.kt#L36 to date = System.currentTimeMillis() but I do not suggest it and am unaware of the full repercussions of this or what issues it might cause. If I had to guess this fix would work fine phones actively being used but if someones phone were to be off for an extended period of time,or out of range for their network, and they were to turn it on and receive messages again the times would line up with when the phone was turned on/reconnect to network instead of when it was received by the SMSC. The issues this would cause are greater than those it would fix. The origin of the issue isn't widespread enough to require the change and the code chooses the right path for resolving what time the text was sent. In writing this up I don't think that there is a real fix but at the very least it provides an explanation for why it's functioning the way it is. I might look into how the app resolves MMS send and receive times since those seem to be accurate.

tibbi commented 2 years ago

I dont want to change such things without being able to reproduce the issue on one of my devices and seeing that it fixed it, without breaking anything.

czadikem commented 2 years ago

I am having the same issue as TheMagicJesus. Where my texts that come in show they are and hour earlier.