summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/genericwrapper.cpp
authorzautrix <zautrix>2004-09-11 16:02:52 (UTC)
committer zautrix <zautrix>2004-09-11 16:02:52 (UTC)
commit53e10fa5e66620ff1eba1c9d17738103ad511c91 (patch) (side-by-side diff)
treec9ed39ce780dc3e8b9b7138781d77db793defdc9 /kmicromail/libmailwrapper/genericwrapper.cpp
parent32f9963a39236d08718a36d5adad2a0c5c4e2602 (diff)
downloadkdepimpi-53e10fa5e66620ff1eba1c9d17738103ad511c91.zip
kdepimpi-53e10fa5e66620ff1eba1c9d17738103ad511c91.tar.gz
kdepimpi-53e10fa5e66620ff1eba1c9d17738103ad511c91.tar.bz2
More mail enh.
Diffstat (limited to 'kmicromail/libmailwrapper/genericwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp
index 2b04847..ed591fc 100644
--- a/kmicromail/libmailwrapper/genericwrapper.cpp
+++ b/kmicromail/libmailwrapper/genericwrapper.cpp
@@ -46,16 +46,26 @@ QString Genericwrapper::parseDateTime( mailimf_date_time *date )
init = true;
}
- QDateTime dt (QDate(date->dt_year,date->dt_month, date->dt_day ),QTime(date->dt_hour, date->dt_min, date->dt_sec ) );
+ QDate da (date->dt_year,date->dt_month, date->dt_day );
+ QTime ti ( date->dt_hour, date->dt_min, date->dt_sec );
+ QDateTime dt ( da ,ti );
int off = KGlobal::locale()->localTimeOffset( dt );
- dt = dt.addSecs( off*60 );
- QString ret = KGlobal::locale()->formatDateTime( dt,true,true);
+ //dt = dt.addSecs( off*60 );
+ QString ret;
+ if ( da == QDate::currentDate () )
+ ret = KGlobal::locale()->formatTime( ti,true);
+
+ else {
+ ret = KGlobal::locale()->formatDateTime( dt,true,true);
+ }
+#if 0
if ( off < 0 )
ret += " -";
else
ret += " +";
ret += QString::number( off / 60 );
ret += "h";
+#endif
#if 0
char tmp[23];