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

Time zone conversions incorrect for UTC-08:00 zone.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.3.2
    • Fix Version/s: 5.4.2
    • Component/s: Core: Date/Time
    • Labels:
      None
    • Environment:
      Mac OSX 10.10.2
      Qt Creator 3.2.2 (opensource)
      Based on Qt 5.3.2 (Clang 5.1 (Apple), 64 bit)
      Built on Oct 10 2014 at 11:17:52
      From revision 34971be5cc
    • Commits:
      402f994f12fc524871f2b1d2337ab07ad3d412b8

      Description

      #include <QCoreApplication>
      #include <QTimeZone>
      #include <QDebug>
      int main(int argc, char *argv[])
      {
          QTimeZone localTimeZone(-28800);                  // Define a variable with this time zone.
          QDateTime theTime(QDate(2014, 02, 01), QTime(9, 10, 20), localTimeZone);               // Define a Date/time variable and give it a time in the winter.
          qDebug() << "theTime is       " << theTime;
          qDebug() << "theTime in UTC is" << theTime.toUTC() << "Should be \"2015-02-01 17:10:20.000 UTC\"";
          return 0;
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            TomDeMay Thomas DeMay
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes