I have a code in which I write a QDateTime to a file ...
someQDateTime.toUTC().toString(Qt::ISODate)
and when I read it with help QDateTime::fromString(), I get a time that is interpreted as being in the system time zone. I can manually add “Z” to the line when I write it out, or use it setTimeSpec()after I read it, and then everything will be fine, but is this the preferred way? Should notString () know to write Z when timeSpec is UTC?
source
share