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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.4.2
    • 5.3.2
    • Core: Date/Time
    • None
    • 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
    • 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

        For Gerrit Dashboard: QTBUG-44600
        # Subject Branch Project Status CR V

        Activity

          People

            thiago Thiago Macieira
            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