Diffstat (limited to 'kmicromail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/imapwrapper.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index 6faa524..5441a9b 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "mailtypes.h" | 7 | #include "mailtypes.h" |
8 | #include "logindialog.h" | 8 | #include "logindialog.h" |
9 | #include <qprogressbar.h> | 9 | #include <qprogressbar.h> |
10 | #include "genericwrapper.h" | ||
10 | 11 | ||
11 | using namespace Opie::Core; | 12 | using namespace Opie::Core; |
12 | int IMAPwrapper::mMax = 0; | 13 | int IMAPwrapper::mMax = 0; |
@@ -456,8 +457,23 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
456 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; | 457 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; |
457 | if ( head == NULL ) | 458 | if ( head == NULL ) |
458 | continue; | 459 | continue; |
459 | if ( head->env_date != NULL ) | 460 | if ( head->env_date != NULL ) { |
460 | m->setDate(head->env_date); | 461 | m->setDate(head->env_date); |
462 | struct mailimf_date_time result; | ||
463 | struct mailimf_date_time* date = &result; | ||
464 | struct mailimf_date_time **re = &date; | ||
465 | size_t length = m->getDate().length(); | ||
466 | size_t index = 0; | ||
467 | if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) { | ||
468 | m->setDate( Genericwrapper::parseDateTime( date ) ); | ||
469 | char tmp[23]; | ||
470 | snprintf( tmp, 23, "%04i-%02i-%02i %02i:%02i:%02i %05i", | ||
471 | date->dt_year,date->dt_month, date->dt_day, date->dt_hour, date->dt_min, date->dt_sec, date->dt_zone ); | ||
472 | m->setIsoDate( QString( tmp ) ); | ||
473 | } else { | ||
474 | m->setIsoDate(head->env_date); | ||
475 | } | ||
476 | } | ||
461 | if ( head->env_subject != NULL ) | 477 | if ( head->env_subject != NULL ) |
462 | m->setSubject(convert_String((const char*)head->env_subject)); | 478 | m->setSubject(convert_String((const char*)head->env_subject)); |
463 | //m->setSubject(head->env_subject); | 479 | //m->setSubject(head->env_subject); |