Quote Originally Posted by mattc View Post
Qt Code:
  1. QDateTime dt2 = dt1.toUTC();
To copy to clipboard, switch view to plain text mode 
The toUTC() is not needed in the above line. All that we need is a copy-constructed QDateTime.

Quote Originally Posted by Roman View Post
Well guess in Qt 4.6 both solutions will fail during the sommertime due to Daylight saving time!
Can you please clarify why it would fail? I am using Qt 4.8.4 and mattc's solution works for me. I did not try the OP's self-reply since mattc's solution seems more elegant and reliable.