Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Getting time zone list from QTimeZone
Forum Updated to NodeBB v4.3 + New Features

Getting time zone list from QTimeZone

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 931 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RamK
    wrote on last edited by
    #1

    I want to get Time zone list and for that I tried using QTimeZone as below,
    @
    QList<QByteArray>timeZonesList = QTimeZone::availableTimeZoneIds();
    foreach (QByteArray id, timeZonesList)
    {
    QTimeZone timeZoneForId(id);
    qDebug()<< timeZoneForId.displayName(QTimeZone::GenericTime) <<":::::::" <<id;
    }
    @

    I am getting very long list and its not exactly matching the time zone listed when we compare with time zone list displayed in windows date time setting -> time zone setting option.

    Please let me know. How to get the list of timezones matching with system timezone list display in system time zone setting dropdown option.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved