owios7 / android-sms

Automatically exported from code.google.com/p/android-sms
0 stars 0 forks source link

Date and time #66

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Backed up messages in gmail do not have the same date and time as the original 
sms 
messages. Is it possible to retain them?

Original issue reported on code.google.com by dimitr...@gmail.com on 27 Jan 2010 at 5:00

GoogleCodeExporter commented 8 years ago
1) Individual messages in a Gmail thread should have the date of the original 
SMS 
message.

2) However, thread dates are controlled by Gmail and are updated when new 
messages 
arrive. In the case of SMS Backup threads, new messages arrive when a backup is 
performed.

If you're not seeing 1), then this is a bug. 2) is expected behavior which I 
cannot 
change.

Original comment by chstu...@gmail.com on 27 Jan 2010 at 5:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I can confirm that whatever version was released before Feb 11 had this bug, 
this is when I downloaded 
the app and did my initial text backup, all those texts are listed with Feb 11 
dates i- not just the threads, 
but the individual emails

Original comment by charleshammond on 24 Feb 2010 at 1:12

GoogleCodeExporter commented 8 years ago
That's strange, I haven't seen this before.

Are the dates of the messages on your phone correct?

Original comment by chstu...@gmail.com on 20 Mar 2010 at 1:38

GoogleCodeExporter commented 8 years ago
@Comment 1 by chstuder

The thread dates are NOT controlled by Gmail.  The thread dates are set to the 
current time if no date is specified in the appendMessages() method called on 
the 
folder.  This is specified in the rfc3501 section-6.3.11.

Is there a proper method in the K9 mail code that implements the full append 
part of 
the IMAP specification?  I had a quick search but could not find such a method.

Thanks

Original comment by wizeguyt...@gmail.com on 20 May 2010 at 9:06

GoogleCodeExporter commented 8 years ago
It's a bug in the embed imapstore.jar, I extracted the source code from k9 
project and did following fix in the 
appendMessages method by adding the third parameter DATE to the APPEND command:

SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss Z", 
Locale.US);
mConnection.sendCommand(
    String.format("APPEND \"%s\" (%s) \"%s\" {%d}",
        encodeFolderName(mName),
        combineFlags(message.getFlags()),
        dateFormat.format(message.getInternalDate()),
        out.getCount()), false);

NOTE that the date format matters, other format won't work.

Original comment by zhouguih...@gmail.com on 28 May 2010 at 9:05

GoogleCodeExporter commented 8 years ago
A hack around the bad date implementation in the code is to use outlook as IMAP.
Then move all the sms emails out of ALL MAIL and onto locally stored folder.
The move them back to gmail and they should have the correct date for each 
thread.

Cheers

Original comment by wizeguyt...@gmail.com on 12 Jun 2010 at 2:00