Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-135109

some POSIX-style TZ strings are not supported by Qt on some Linux-based platform

    XMLWordPrintable

Details

    • Linux/X11
    • 3
    • f68240616 (dev), 0191826f4 (6.9), c7ceae561 (6.8)
    • Foundation Sprint 128

    Description

      Qt seems does not recognize timezone with daylight savings offsets such as 
      the time zone offset for Sydney is: AEST-10AEDT,M10.1.0,M4.1.0/3.  and Qt does not seems to recognize this one.

      On the other hand, standard time zone offsets like Asia/Shanghai CST-8 can be recognized without any issues.

      Following code returns empty for qDebug()<<"Qt Timezone Id="<<systemTime.id();

      int main(int argc, char *argv[])
      {
      qputenv("TZ"," AEST-10AEDT,M10.1.0,M4.1.0/3");
      QApplication a(argc, argv);
      QTimeZone systemTime= QTimeZone::systemTimeZone();
      qDebug()<<"System Timezone ID="<<systemTime.systemTimeZoneId();
      qDebug()<<"Qt Timezone Id="<<systemTime.id();
      return a.exec();
      } 

      Attachments

        1. Demo2.pdf
          348 kB
        2. QTimeZone Bug.pdf
          613 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Eddy Edward Welbourne
              irfan.omair@digia.com Irfan Omair
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change