Commit 82ad4be4 authored by Edward Welbourne's avatar Edward Welbourne Committed by Tony Sarajärvi
Browse files

Fix various uncommon cases in QTzTimeZonePrivate backend

Includes a fixup for 03fadc26

, which
removed the check on empty transition list, needed when no data are
available.  Ensured that such a data-free zone would in fact be
noticed as invalid during init().

Fixed handling of times before the epoch (we still want to consult a
POSIX rule, if that's all that's available) while ensuring we (as
documented) ignore DST for such times.

Fixed handling of large times (milliseconds since epoch outside int
range) when looking up POSIX rules.  Gave QTimeZonePrivate a YearRange
enum (to be moved to QTimeZone once this merges up to dev) so as to
eliminate a magic number (and avoid adding another).  Moved
year-munging in POSIX rules after the one early return, which doesn't
need the year range.

Added test-cases for the distant past/future (just checking UTC's
offsets; SLES has a minimal version of the UTC data-file that triggers
the bugs fixed here for them).

Fixes: QTBUG-74666
Fixes: QTBUG-74550
Change-Id: Ief7b7e55c62cf11064700934f404b2fc283614e1
Reviewed-by: default avatarTony Sarajärvi <tony.sarajarvi@qt.io>
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
Showing with 43 additions and 23 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment