QTimeZone::displayName() may return empty if it has no suitably-localized name for the zone. So QCalendarBackend's dateTimeToString() can't rely on its tzAbbr() returning a string that starts with UTC (and it may now, with proper L10n, start with some other prefix) or indeed has length >= 3 (so sliced(3) could crash). Rework the handling of offset name (mainly for the pick back to 6.8, as I'll be back to get rid of the kludging in 6.9) to at least not crash on empty return. In the process, use decreasingly appropriate forms as fallbacks if we don't get what we want. Fixes: QTBUG-129696 Change-Id: Id4f42778ca9a4806ac5dba23ce7068261a90500b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9e749df879a5bc76fa416c96f73378d81608801f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%