
Originally Posted by
ad5xj
What am I doing wrong?
This works for me:
QString abbr
= curtim.
timeZoneAbbreviation();
qDebug() << "Current time: " << curtim.toString("hh:mm:ss t");
qDebug() << "TZ=" << abbr;
QDateTime curtim = QDateTime::currentDateTime();
QString abbr = curtim.timeZoneAbbreviation();
qDebug() << "Current time: " << curtim.toString("hh:mm:ss t");
qDebug() << "TZ=" << abbr;
To copy to clipboard, switch view to plain text mode
Output:
Current time: "15:00:01 CDT"
TZ= "CDT"
Current time: "15:00:01 CDT"
TZ= "CDT"
To copy to clipboard, switch view to plain text mode
Bookmarks