correct convertion from QDateTime to internal format