QTimeZone time_zone; QList<QByteArray> stl_llist = time_zone.availableTimeZoneIds(); int i=0; foreach (QByteArray child_stl_llist, stl_llist) { i++; QTimeZone zone(child_stl_llist); QDateTime date; date.setTimeZone(zone); qDebug() << "№: " << i << "Time Zone: " << child_stl_llist << "Abrivation: " << zone.displayName(QTimeZone::GenericTime, QTimeZone::DefaultName); }
C++ (Qt)QList<QByteArray> QTimeZone::availableTimeZoneIds()
QList<QByteArray> stl_llist = time_zone.availableTimeZoneIds(); int i = 0; QStringList stringList; foreach (QByteArray child_stl_llist, stl_llist) { QTimeZone zone(child_stl_llist); QString temp(zone.displayName(QTimeZone::GenericTime, QTimeZone::LongName)); stringList += temp; qDebug() << "№: " << i+1 << " " << stringList[i]; i++; }
C++ (Qt)bool QTimeZone::hasTransitions() const