How to get yyyy-MM-ddThh: mm: ssTZD from QDateTime
Unsolved
General and Desktop
-
I'm trying to get the time zone date using QDateTime, what I expect is something like 2018-03-19T00: 00: 00-02: 00 but what I get is 2019-10-27T19: 56: 09-2147483648
QDateTime dh = QDateTime::currentDateTimeUtc(); QString dataHoraEmi = dh.toString("yyyy-MM-ddThh:mm:ss"); dataHoraEmi.append(dh.timeZone().offsetData(dh).standardTimeOffset);
-
Hi,
Are you looking to the date in the ISO-8601 format ? If so, I think this overload of toString will be of interest.
Hope it helps