How to get a vaild mail time +0200 GMT or so....
and not local LANG month day letter?

this return Date: lun, 28 feb 2006 11:06:17 +0200 italian LANG...

Qt Code:
  1. QString Smtp::TimeStampMail()
  2. {
  3. /* Date: Mon, 08 May 2006 17:57:52 +0200 */
  4. /* Date: Sun, 28 May 2006 06:32:25 -0420 */
  5. QDateTime dt = QDateTime::currentDateTime();
  6. QDate timecute;
  7. QString day_en = timecute.shortDayName(timecute.day());
  8. QString month_en = timecute.shortMonthName (timecute.month());
  9. QString last = dt.toString("yyyy hh:mm:ss");
  10. QString maildate = QString( "Date: %1, %2 %3 %4 +0200" ).arg( day_en , QString::number(timecute.day()), month_en , last );
  11. return maildate;
  12. }
To copy to clipboard, switch view to plain text mode