diff options
author | John Layt <jlayt@kde.org> | 2013-09-20 18:35:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-21 09:25:23 +0100 |
commit | 8e6258f059140ce735391b6438d5976dc9469e95 (patch) | |
tree | 463f8f17ac333f0e035ee5f1779355b0294a51de /src/corelib/tools/qtimezone.cpp | |
parent | c03ea9be38a3c23b54e56bb567205a02ad4d1e19 (diff) |
QTimeZone - Fix TZ file abbreviations
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>
Diffstat (limited to 'src/corelib/tools/qtimezone.cpp')
-rw-r--r-- | src/corelib/tools/qtimezone.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp index 37d6e183a7..5fec06b30a 100644 --- a/src/corelib/tools/qtimezone.cpp +++ b/src/corelib/tools/qtimezone.cpp @@ -708,6 +708,9 @@ bool QTimeZone::hasTransitions() const This is most useful when you have a Transition time and wish to find the Transition after it. + If there is no transition after the given \a afterDateTime then an invalid + OffsetData will be returned with an invalid QDateTime. + The given \a afterDateTime is exclusive. \sa hasTransitions(), previousTransition(), transitions() @@ -726,6 +729,9 @@ QTimeZone::OffsetData QTimeZone::nextTransition(const QDateTime &afterDateTime) This is most useful when you have a Transition time and wish to find the Transition before it. + If there is no transition before the given \a beforeDateTime then an invalid + OffsetData will be returned with an invalid QDateTime. + The given \a beforeDateTime is exclusive. \sa hasTransitions(), nextTransition(), transitions() |