owios7 / android-sms

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

'Date'-header is saved as localized value #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. backup messages from a german g1
2. examine date and time

What is the expected output? What do you see instead?

gmail shows the time it gets the message instead of the time the message 
was sent, a quick look at the mailheaders shows:

[...]
Date: Di, 31 Mrz 2009 11:55:10 +0200
[...]

instead of for example

[...]
Date: Tue, 31 Mar 2009 12:26:27 +0200
[...]

What version of the product are you using? On what operating system?

1.0.0 on german g1 with android 1.1

Original issue reported on code.google.com by jozi.bue...@gmail.com on 31 Mar 2009 at 1:48

GoogleCodeExporter commented 8 years ago
Gmail shows two different dates: At thread level (message listing) it shows the 
last update time of the thread 
(which is upload time). When clicking on the thread, Gmail shows the individual 
message dates.

Is Gmail able to extract the date even if it's localized? I.e., is the 
individual message date correct in your 
example?

Original comment by chstu...@gmail.com on 8 Apr 2009 at 6:28

GoogleCodeExporter commented 8 years ago
the X-smssync-id-header is localized correctly, so the overview's date is 
shown. the
individual date is not shown by gmail or any mailclient i use (kmail and mutt).

here's a more or less complete header as example:

[...]
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: base64
Date: Mi, 25 Mrz 2009 11:19:37 +0100
References: <lfj5y7lg1r9o7mmd012dt0ex.***@smssync.studer.tv>
X-smssync-id: 42
X-smssync-address: ***
X-smssync-type: 1
X-smssync-date: 1237976377000
X-smssync-thread: 14
X-smssync-read: 1
X-smssync-status: -1
X-smssync-protocol: 0
X-smssync-service_center: ***
X-smssync-backup_time: 29 Mar 2009 20:31:45 GMT
[...]

Original comment by jozi.bue...@gmail.com on 8 Apr 2009 at 9:39

GoogleCodeExporter commented 8 years ago
uh, i mean gmail shows the time the thread was updated correctly, the
smssync-backup_time header has nothing to do with this.

just the individual time isn't right, at least for months where the localized 
and
standard values differ, with april's messages for example gmail (and other 
mua's)
show the correct date because the german and english short form for april (apr) 
are
the same. at least at monday and saturday, where the short forms for the day 
are the
same.

Original comment by jozi.bue...@gmail.com on 9 Apr 2009 at 8:10

GoogleCodeExporter commented 8 years ago
I see, that makes sense. I'll investigate whether I can persuade the mail 
library to 
write times in us-en independent of the Java runtime locale.

Original comment by chstu...@gmail.com on 9 Apr 2009 at 10:10

GoogleCodeExporter commented 8 years ago
Issue 36 has been merged into this issue.

Original comment by chstu...@gmail.com on 30 Jul 2009 at 3:04

GoogleCodeExporter commented 8 years ago
Sorry for duplicate.

Maybe adding this piece of code after calling setSentDate in CursorToMessage 
class
will override the mail library bug ?
DateFormat df =  new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 
Z",Locale.ENGLISH);
msg.setHeader("Date", df.format(then));

Haven't tested (still no SDK installed).

Original comment by thiel.al...@gmail.com on 30 Jul 2009 at 3:47

GoogleCodeExporter commented 8 years ago
The newest version of the IMAP library I'm using has this bug fixed. 
Unfortunately it introduced other bugs that 
prevented me from releasing an update. I hope to be able to look into it real 
soon(tm).

Original comment by chstu...@gmail.com on 30 Jul 2009 at 8:29

GoogleCodeExporter commented 8 years ago
I have submitted a new version of the IMAP library in revision r57 and this bug 
should be fixed in the next 
release.

Original comment by chstu...@gmail.com on 2 Aug 2009 at 10:00