Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.4.2
-
None
-
Qt 4.5.2
tzdata 2015e
Archlinux
-
5c67ce5d6da11b8c4e445bba2a3ffb7b6e7f45d9
Description
QdateTime fails to convert dates to some timezones with partial hour like `-4:30` and `-9:30`. This bug currently affects conversions with the `America/Caracas` and `Pacific/Marquesas` timezone but could affect others in the future.
The function parsePosixOffset from qtimezoneprivate_tz.cpp fails to generate a valid offset for timerules like `4:30`.
I am attaching a testcase that reproduce this bug (using the datetime source files from the 4.5.2 tarball) and a compile flag that uses the fixed function.
I am also attaching a patch that fixes the bug (applied to the 5.4.2 Qt tarball).
To compile/run the testcase:
qmake make ./timezone
To compile/run the fixed testcase:
qmake CONFIG+="TIMEZONE_FIX"
make
./timezone
Related bug reports:
https://bugs.kde.org/show_bug.cgi?id=343610
https://bugreports.qt.io/browse/QTBUG-44614