Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS messages on a specific day erroneously have the same time in html #64

Open
juliuspfadt opened this issue Oct 2, 2023 · 9 comments
Assignees
Labels
bug Something isn't working pending for release Feature or bug fix to be released

Comments

@juliuspfadt
Copy link

I exported a WhatsApp chat from my iphone backup, and when looking at the html, all times for a chat on a specific day are equal, when in truth they are not.

@KnugiHK
Copy link
Owner

KnugiHK commented Oct 2, 2023

Do you meant inside the chat, only messages on a specific day have the same time, but the rest of the messages in the chat have the correct times?

@juliuspfadt
Copy link
Author

juliuspfadt commented Oct 3, 2023

no, for a single chat, on each day all the messages have the same time. Different days do have different times though. so in total, none of the messages have the correct time, only the correct date. Although I assume that maybe always the first message of a day has the correct time

KnugiHK added a commit that referenced this issue Dec 3, 2023
@KnugiHK
Copy link
Owner

KnugiHK commented Dec 3, 2023

Hi @juliuspfadt. I tried to fix the issue in f81f31d. However, as mentioned in another issue, I don't currently have access to the iOS WhatsApp. Therefore, I am not sure if the time exported is correct. You may want to give it a try in the dev branch.

@KnugiHK KnugiHK added the bug Something isn't working label Dec 3, 2023
@KnugiHK KnugiHK self-assigned this Dec 3, 2023
@LoSunny
Copy link

LoSunny commented Dec 3, 2023

Yes this indeed solve the issue. Also, is there a way for us to adjust the timezone? By default it seems to assume GMT, can we set hour own timezone or used the computer timezone as default?

@KnugiHK
Copy link
Owner

KnugiHK commented Dec 3, 2023

Yes this indeed solve the issue. Also, is there a way for us to adjust the timezone? By default it seems to assume GMT, can we set hour own timezone or used the computer timezone as default?

We can use pytz. But I want to keep the dependency minimal. Therefore, I implemented a simple offset option --time-offset in 9495691.

@juliuspfadt
Copy link
Author

juliuspfadt commented Dec 3, 2023

That fixes the issue yes. But I also found that the timestamps are not always in the correct order when extracted from the database. I had them printed in seconds, and it was evident why the messages would be not in chronological order. I added a few lines that would make sure they were in ascending order to the code, and that fixed the issue for me.

@KnugiHK
Copy link
Owner

KnugiHK commented Dec 7, 2023

That fixes the issue yes. But I also found that the timestamps are not always in the correct order when extracted from the database. I had them printed in seconds, and it was evident why the messages would be not in chronological order. I added a few lines that would make sure they were in ascending order to the code, and that fixed the issue for me.

Thanks for pointing out the problem. Does adding ORDER BY timestamp ASC (Android) and ORDER BY ZMESSAGEDATE ASC (iOS) to the SQL query solve the problem?

@juliuspfadt
Copy link
Author

juliuspfadt commented Dec 7, 2023

I only know about the iOS solution, and yes, that solves the problem. Feel free to close this

@KnugiHK
Copy link
Owner

KnugiHK commented Dec 7, 2023

I will leave this open until next release. Thanks a lot!

@KnugiHK KnugiHK added the pending for release Feature or bug fix to be released label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending for release Feature or bug fix to be released
Projects
None yet
Development

No branches or pull requests

3 participants