mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-07 11:48:02 -05:00
DAV: another datereceived fix
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1174 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
6dd90d4b03
commit
1a5e963c1b
@ -572,7 +572,7 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
for (String attributeName : CONTACT_ATTRIBUTES) {
|
for (String attributeName : CONTACT_ATTRIBUTES) {
|
||||||
String value = getPropertyIfExists(properties, attributeName);
|
String value = getPropertyIfExists(properties, attributeName);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
if ("bday".equals(attributeName) || "lastmodified".equals(attributeName)) {
|
if ("bday".equals(attributeName) || "lastmodified".equals(attributeName) || "datereceived".equals(attributeName)) {
|
||||||
value = convertDate(value);
|
value = convertDate(value);
|
||||||
}
|
}
|
||||||
put(attributeName, value);
|
put(attributeName, value);
|
||||||
|
@ -98,7 +98,7 @@ public class TestExchangeSessionMessageFlags extends AbstractExchangeSessionTest
|
|||||||
MimeMessage mimeMessage = createMimeMessage();
|
MimeMessage mimeMessage = createMimeMessage();
|
||||||
String messageName = UUID.randomUUID().toString();
|
String messageName = UUID.randomUUID().toString();
|
||||||
HashMap<String, String> properties = new HashMap<String, String>();
|
HashMap<String, String> properties = new HashMap<String, String>();
|
||||||
SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
SimpleDateFormat dateFormatter = ExchangeSession.getExchangeZuluDateFormat();
|
||||||
dateFormatter.setTimeZone(ExchangeSession.GMT_TIMEZONE);
|
dateFormatter.setTimeZone(ExchangeSession.GMT_TIMEZONE);
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
cal.add(Calendar.MONTH, -1);
|
cal.add(Calendar.MONTH, -1);
|
||||||
@ -108,7 +108,8 @@ public class TestExchangeSessionMessageFlags extends AbstractExchangeSessionTest
|
|||||||
assertNotNull(messageList);
|
assertNotNull(messageList);
|
||||||
assertEquals(1, messageList.size());
|
assertEquals(1, messageList.size());
|
||||||
assertNotNull(messageList);
|
assertNotNull(messageList);
|
||||||
assertEquals(properties.get("datereceived"), messageList.get(0).date);
|
// TODO: use same format for date read/write
|
||||||
|
assertEquals(ExchangeSession.getZuluDateFormat().format(cal.getTime()), messageList.get(0).date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user