summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qtimezone
Commit message (Collapse)AuthorAgeFilesLines
* Adjust tst_QTimeZone's Q_OS_WIN #if-ery now that ICU is the defaultEdward Welbourne2018-03-092-10/+14
| | | | | | | | | | | | | Various tests were adapted to Q_OS_WIN to take account of the deficiencies in its TZ APIs; which are now bypassed when ICU is configured, as we use it instead. Replace some #if-ery on a local define with QT_CONFIG(icu) and QMAKE_USE_PRIVATE += icu here, to match in corelib/tools/tools.pri Task-number: QTBUG-66367 Change-Id: Ia93abdeb7d12046310f0bb4a78c2669f8eecbbc2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Test Russia's post-DST transitions are reported correctlyEdward Welbourne2018-01-191-0/+62
| | | | | | | | | | | | This is a regression test for bugs resulting from failure to take account of the MS TZ APIs fake-DST handling of standard-time transitions happening during DST. Has to skip the 2014 test on Win7, as it's so old it doesn't know about the (for it) "future" transition. Task-number: QTBUG-42021 Change-Id: I853b86d03a86f0269371bf1622bf63882fb8ee5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Kludge round MS TZ APIs' lies breaking a testEdward Welbourne2017-12-131-0/+8
| | | | | | | | | | | | | | | | Commit 68bcccac took account of MS TZ APIs mis-describing non-DST zones making changes to standard offset (e.g. Europe/Samara in 2011 at the end of October); however a DST transition that coincides with an equal and opposite change to standard offset, while the other end of its DST period changes normally, ends up looking exactly the same (although it's nominally subtly different), in MS's APIs. Thus fixing the more common case broke this more obscure case; there is no way to fix this (other than not using MS's broken-by-design APIs). So kludge the test to skip the bit we know this breaks. Task-number: QTBUG-64985 Change-Id: I068500e2e783ab72b400bfd6dbb7dbbd5b08a7bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a check of selected time-zone offset dataEdward Welbourne2017-11-301-0/+47
| | | | | | Task-number: QTBUG-64122 Change-Id: I6b113f2f05db9659b8c542744846096e39f285ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix typo in tst_QTimeZone::testEpochTranPrivate()Edward Welbourne2017-11-061-1/+2
| | | | | | | | | | The milli-seconds since epoch value for an invalid transition is, of course, invalidMSecs(), not invalidSeconds(). Added a comment while I was at it, explaining why we expect a transition before the epoch, if such transitions are supported. Change-Id: I0f376f9d69c0e6e79a309dc011943baa41175135 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add test for time zone transitions near the epochEdward Welbourne2017-07-281-0/+44
| | | | | | | | | | | | | | | | | | | | | This needs a zone with transitions near the epoch; and the only CET with DST that winter was Italy (copied by Malta), for which the Olson database had a recent (2016) correction to its data, for that winter. That means we get inconsistent results on O/Sen of different ages. So add a separate testEpochTranPrivate(), alongside testCetPrivate(), and test it with America/Toronto. (Unfortunately, MS-Win gets the date wrong on the first transition after the epoch, so we have to code round that.) Since information before the epoch isn't reliably available, only test the search backwards if nextTransition does find something before it. (We can safely assume all real transitions happened since 1601; non-celestial time-keeping wasn't accurate enough, before that, for anyone to synchronize with anything but celestial time.) Change-Id: I984b46938a2805b93bb2afd6855e317b5d66b386 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QTimeZone: improve readability of code and failure reportsEdward Welbourne2017-07-251-36/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When QCOMPARE(,) reports two 12-digit numbers, it's not always immediately obvious what the difference is (much less what 1/3600000 of it is); nor is it obvious that (or why) a given 12-digit number is in fact correct. In contrast, our eyes can make sense of a QDateTime's reported value quite well, enabling us to see what's different; and it's possible to at least confirm the plausibility of 2-or-3 am on a spring or autumn day at a plausible transition (or even to confirm it exactly by consulting suitable web-sites). Also document the actual transition happening in each case (since I *did* consult a suitable web-site). So prefer to QCOMPARE(,) two QDateTime values instead of two 12-digit qint64s. Where a that would be unsuitable, at least compare the difference to zero, to make the error easier to understand (except when one of the twelve-digit numbers consists entirely of 9s; that, for once, actually is easy to see). Write various multiples of 3600 as the relevant intelligible whole number times 3600, rather than premultiplying, to make it obvious to reders what's going on. None of this changes what is actually tested. Change-Id: I488e751283a55d4623c93612af13ad631144900d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix a loop-test and the bogus data the loop expectedEdward Welbourne2017-07-251-3/+3
| | | | | | | | | | | A loop initialized i = 0 and used i > 2 as its condition; it didn't get very far. Consequently, the test it was in never checked whether CET's 2011 transitions happened at the times expected - which they didn't, as the times in question were in fact the times at which Pacific/Auckland had its transitions that year. Change-Id: I94d1f8df615c5bcfe48e73d41b4c7faf2beccb96 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-191-1/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Fix sending UTC-offset QTimeZones through QDataStreamChris Wilson2017-06-081-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTimeZone("UTC") should be valid, as "UTC" appears in the list of availableTimeZoneIds(), and tst_QTimeZone::dataStreamTest() constructs timezones like this, which are considered valid. The internal representation of a QTimeZone("UTC") as created by QTimeZone::QTimeZone(const QByteArray &ianaId) is a QUtcTimeZonePrivate which isValid(), so the containing QTimeZone isValid() too. When QTimeZone is serialized into a QDataStream, it calls tz.d->serialize(ds) which is QUtcTimeZonePrivate::serialize. This writes QStringLiteral("OffsetFromUtc") followed by the IANA ID and the offset (etc.) to the datastream. When QTimeZone is deserialized it looks for this marker string, and if present, it passed all of the parameters to the QTimeZone constructor (not just the name). However, that constructor does not support standard IANA timezones (only custom ones), and when it detects that the supplied IANA ID is actually listed in availableTimeZoneIds(), it leaves the pointer to the QTimeZonePrivate uninitialized (NULL), which leaves the QTimeZone invalid (isValid() returns false). Thus, a valid timezone which was serialized and then deserialized has become invalid. This also affects serialization of QDateTimes with timezones. Fixed by calling the name-only constructor first, which works (only) for IANA standard timezones and leaves the QTimeZone invalid (isValid() returns false) otherwise. In which case, we can call the many-argument contructor to create a custom timezone with the same offset as the one which was originally serialized. [ChangeLog][QtCore][QTimeZone] Fixed sending IANA standard UTC-offset QTimeZones through QDataStream, which previously came out invalid after deserialization. Task-number: QTBUG-60595 Change-Id: Id9c47e8bda701faae4d800e012afb6db545b2fe9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | tst_QTimeZone: fix #if-ery to use Q_OS_DARWINEdward Welbourne2017-03-221-4/+4
|/ | | | | | | Avoid using deprecated define in test. Change-Id: I33550ae6cfb1ebe03550826371c763afa35f1972 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Unexport QTimeZonePrivateMarc Mutz2017-02-231-0/+2
| | | | | | | | | | | It's only used in the autotests, and it private API, so downgrade from Q_CORE_EXPORT to Q_AUTOTEST_EXPORT. Fix a use of QTimeZonePrivate functions unprotected by QT_BUILD_INTERNAL in tst_qtimezone.cpp. Change-Id: I70eaea06f8fcf2983aeafb6894c3a5d2a4b272a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add conversion functions for QTimeZone and CFTimeZone/NSTimeZoneJake Petroules2017-01-233-0/+84
| | | | | Change-Id: I3a2e18d69577296bf612e13e40414bce1daa6a71 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QTimeZone::printTimeZone: pass zone by referenceEdward Welbourne2016-12-121-2/+2
| | | | | | | It's a const parameter, so no sense copying it. Change-Id: I4a673a6a60af9bfe7cb61ce28de2aa295fa1d069 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QTimeZone: tidy up handling of debug memberEdward Welbourne2016-12-121-8/+4
| | | | | | | | Make it const, initialize it instead of assigning, consolidate testing of it round some #if-ery. Change-Id: I2efbf58292a0edd2ceb3da8d3cc16246e84a3bac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime, QTimeZone: fix mappings from zone time to UTCEdward Welbourne2016-12-121-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Such mappings are ill-defined in the presence of daylight-savings time (DST); at its transitions, you need information about whether DST is active or not to determine the correct UTC value. Existing code did not have a way to be told that hint, so could not be correct. Fixing this required changing the (thankfully private) APIs by which QDateTime accessed QTimeZone's information stipulated by zone time. In QDateTime, this required propagating the needed hint, when DST status was known. QAndroidTimeZonePrivate overloaded QTimeZonePrivate::dataForLocalTime with an implementation that works whenever !hasTransitions(); the base implementation handled this case lamely, so I've moved the Android implementation there, to have only one place for both re-writes. Amended tst_QDateTime's expected failures; passing a date and time to the constructor *is* ambiguous when the moment indicated is in a transition. I have changed which way we resolve that ambiguity. Added round-trip test of QDateTime's fromMSecs/toMSecs (but as a QTimeZone test, since that's what's actually getting tested), based on a test-case from Marko Kangas. Initially failed for various zones, each at one hour-offset; and, on some platforms, for some zones, at all offsets. These last revealed that a platform may claim to have zone information yet, for some zones, lack it (or have very incomplete information). In each case, despite this, the platform does give offsetFromUtc(). (The test also found another pre-existing bug on Linux; fixed in an earlier commit.) To accommodate these gaps in transition data, the transition-based code now falls back to the offsetFromUtc()-based code (used when there are no transitions) if it can't find a previous transition (which, in any case, it needs to do its job). Task-number: QTBUG-56460 Task-number: QTBUG-56397 Task-number: QTBUG-52284 Change-Id: I2f7422a9e9d3767940b1901d887c6a2c1f36ac9f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use qtConfig throughout in qtbaseLars Knoll2016-08-191-1/+1
| | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| * Fix parsing of tzfile(5) POSIX rule zone names with bracket quotesThiago Macieira2016-05-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX.1-2001 allows quoting a zone name so that it can contain other characters besides letters, by enclosing it in angle brackets ('<' and '>'). This hadn't been used until recently (tzdata2016b), when the Asia/Barnaul rule started using a zone name "+07" (the name variable contained the value "<+07>-7"). Thanks to Paul Eggert for reporting and investigating the root cause. Task-number: QTBUG-53071 Change-Id: Id5480807d25e49e78b79ffff1449bc410776cb66 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-292-8/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| * Autotest: fix the QTimeZone::tzTest failure when database contains LMTThiago Macieira2016-04-292-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some operating systems, tzdata files carry the Local Mean Time (LMT) for the city in question, which better represents how time was tracked before standard, hourly timezones were introduced in the early 20th century. The test was asking for the data for 1653-02-09 and assumed that it would find the first Central European Time (CET) rule, which Germany didn't start using until 1893-04-01. This fix allows us to remove the blacklist that had been applied to this test without investigation. It wasn't related to OpenSUSE, aside from the fact that OpenSUSE tzdata carries the LMT data. Change-Id: Id5480807d25e49e78b79ffff1449bdaf46901367 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| * WinRT: Fix QTimeZone transitions by switching backendMaurice Kalinowski2016-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously WinRT was using the UTC backend which fails on all platforms for some QDateTime autotests related to timezone items. Hence switch to the Windows implementation for WinRT as well. However, the windows backend does query the registry heavily, which is not supported on WinRT. Instead use the API version provided by the SDK. Long-term we might want to switch to this version on desktop windows as well, as direct registry access would not be required and we could harmonize the codepaths for both platforms. Change-Id: I620b614e9994aa77b531e5c34c9be1da7e272a30 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-1/+1
| | | | | | | | | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-011-1/+0
|/ | | | | Change-Id: I1955320e7639760b4383a53f37a506c8055933ef Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * QTimeZone: Convert fractional timezones properly.Cesar Garcia Naranjo2015-07-211-0/+18
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QTimeZone] Fixed a wrong timezone conversion when the POSIX timezone rule contains a fractional timezone (e.g. VET4:30). Task-number: QTBUG-47037 Change-Id: I5d9052929bbcde174614ccf07c329264603e6431 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Blacklist and skip various tests that are flakeySimon Hausmann2015-06-141-0/+2
|/ | | | | | | | | | They didn't show up in the "old" CI runs because they usually pass the second time they are executed - which the testrunner does. The new CI doesn't do that anymore, instead we now mark those tests explicitly and will track their record of passing and failing in the new metrics database. Change-Id: Id34dd6f792f38995b07b6fec88f833df64de2f8b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* tst_QTimeZone: test QTimeZonePrivate::isValidId()Marc Mutz2014-07-311-0/+61
| | | | | | | This is in preparation of rewriting the function for efficiency. Change-Id: Id5c16b984b95d76e1f26d862e3813f75980f44fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-161-0/+31
|\ | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
| * QTimeZone: Fix isValidId()John Layt2013-12-061-0/+31
| | | | | | | | | | | | | | | | | | | | Fix isValidId() which was failing valid IDs because it was splitting name parts by \ instead of /. it was also rejecting offset from UTC formats names. Add unit tests. Task-number: QTBUG-35025 Change-Id: I4d23d2e54f4a9fac9afcc4eff0a02d6f4af21385 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-22/+72
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * QTimeZone - Fix dateForLocalTime() to check validity of next transitionJohn Layt2013-11-211-0/+4
| | | | | | | | | | | | | | | | | | The private method dateForLocalTime() was not checking that transitions were valid, resulting in infinite looping when a time zone didn't have any future transitions. Change-Id: I0e5d07063861778dd86056a80c36fdd9f9d36133 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * QTimeZone - Fix TZ file abbreviationsJohn Layt2013-11-211-4/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix parsing of TZ file abbreviations, to correctly return cases where POSIX rule doesn't have separate DST rules, and where abbreviation is a sub-string of another abbreviation, otherwise any toString() call will crash. Add test to exercise all available time zones, especially useful for TZ file to confirm all file format variations dealt with. Fix parsing of Version 3 of TZ file, and ICU display name, to allow all files generated from release 2013f to pass, otherwise isValid() call will crash. Task-number: QTBUG-34061 Change-Id: Ie0b6abc218adff1c8967eb33fdb0762041d2305f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QTimeZone - Change Olsen ID to IANA IDJohn Layt2013-11-211-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name Olson was misspelled as Olsen in the public api of QTimeZone which is needed to be fixed before first public release in 5.2 would freeze the api and prevent it being fixed. It has been decided that renaming as IANA ID would be more future-proof. Fixes to the private code will be done separately to keep this patch against release branch to the minimum required. Task-number: QTBUG-34735 Change-Id: I8ee90644862c907f6d1937b8536f0c02583ae736 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix QTimeZone test compilation on WinRTAndrew Knight2013-11-041-1/+1
|/ | | | | | | | WinRT doesn't use the Windows Timezone backend, so don't build the Windows test. Change-Id: I32620546de3ad1f19402cc1359f8038200c915ec Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* don't erroneously claim that gui support is neededOswald Buddenhagen2013-10-161-1/+1
| | | | | Change-Id: Ia7b1f02cab9fa0fc9e487ca49d75e85ed0cfee9d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add Windows backendJohn Layt2013-09-231-25/+84
| | | | | | | Add backend implementation for Windows times zones. Change-Id: I30946f6672488c3f1d1d05754e9479aa62cce46f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add Mac backendJohn Layt2013-09-231-0/+50
| | | | | | | Add Mac backend support Change-Id: Iafa2dbd925e18431f571e3eac62983015f8bc977 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add TZ File BackendJohn Layt2013-09-221-0/+138
| | | | | | | | | | Add a backend for TZ Files. If available uses ICU for the display names and translations, otherwise the abbreviation is used. Change-Id: I58c777462810b1a76ea7bd95886836b70b8a3db5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add ICU supportJohn Layt2013-09-221-0/+141
| | | | | | | Add ICU backend for QTimeZone Change-Id: I92e53a848477e366591102064b093e936f0b49d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Define new class and apiJohn Layt2013-09-222-0/+508
Implement the new QTimeZone class based on the Olsen Time Zone ID's. This is the base implementation and does not include the Platform backends which are implemented separately. This change does include a default UTC backed to be used if no Platform backend is available, i.e. if QT_NO_SYSTEMLOCALE is set and ICU is not configured. This backend also provides a default set of time zones in the standard "UTC+00:00" offset format that are guaranteed to always exist regardless of the Platform backend. This change includes conversion functions between the Olsen ID's and Windows ID's using a conversion table based on Unicode CLDR data. This is implemented for all platforms for scenarios such as a Linux program needing to communicate with a Windows Exchange Server using the Windows ID. The CLDR conversion table is included under the UNICODE license, see http://unicode.org/copyright.html for details. [ChangeLog][QtCore][QTimeZone] Added new QTimeZone class to support time tone calculations using the host platform time zone database and the Olsen time zone ID's. Change-Id: Ibb417d08cf2663a0979d2be855d2c6ad6ad01509 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>