The server send my a date format evry time on GMT null format... Greenw...
"Wed, 07 Feb 2007 18:44:19 GMT"
to append one one H i make so...
dateTime2.addSecs(3600); /* by hand ....*/
but how i can discovery a calculable local date.... +1 or -1

muss i build a switsch for evry 24 world H. time....

I like Unix time format to display human readable time and to see diff from localfile lastmod time.... (QFileInfo)

Qt Code:
  1. /* grab remote server gmt time to check localfile lastmod update or not */
  2.  
  3.  
  4. uint MailTimeString( QString indate )
  5.  
  6. {
  7.  
  8. /* incomming format Wed, 07 Feb 2007 18:44:19 GMT*/
  9.  
  10. /* or mail rtf Date format! http://www.faqs.org/rfcs/rfc788.html */
  11.  
  12. indate.replace("Date:","");
  13.  
  14. indate.trimmed();
  15.  
  16. QLocale::setDefault(QLocale::C); /* on comment out time is bad */
  17.  
  18. QStringList sdate = indate.split(" ");
  19.  
  20. if (sdate.size() != 6) {
  21.  
  22. return QTime_Null(); /* time current uint format */
  23.  
  24. }
  25.  
  26. sdate.removeFirst();
  27.  
  28. sdate.removeLast();
  29.  
  30. QString reformat = sdate.join(" ");
  31.  
  32. QDateTime dateTime2 = QDateTime::fromString(reformat,"dd MMM yyyy HH:mm:ss");
  33.  
  34. QDateTime dateTime3 = dateTime2.addSecs(3600); /* GMT +1 switzerland */
  35.  
  36. QLocale::system(); /* on comment out time is bad */
  37.  
  38. return dateTime3.toTime_t();
  39.  
  40. }
To copy to clipboard, switch view to plain text mode