Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6
-
None
-
-
13
-
Foundation PM Staging
Description
In our unit tests we set the locale to be German to get a consistent output between Windows and Linux builds. We figured out that in Windows the year has 4 digits and on Linux it hast 2 digits.
Digging into this I always thought that this was due to Linux but I figured out that Qt just does not seem to take the installed locale into account.
On my system (Ubuntu 23.04) the locale de_DE says
% Appropriate date representation (%x)
d_fmt "%d.%m.%Y"
which should be the same as on Windows (4 digits).
Interestingly my KDE5 desktop also shows the date in 2 digits.
A good workaround would be if it was possible to specify the date format of a QLocale programmatically (eg. a setter method). This would also be very helpful for our unit tests.
Attachments
Issue Links
- relates to
-
QTBUG-70516 Extend Qt's support for CLDR date/time formatting
- Open
-
QTBUG-122633 QLocale doesn't align with C library functions to let us use them for system locale data
- Open
Gerrit Reviews
For Gerrit Dashboard: QTBUG-122216 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
448802,23 | QLocale: use real system APIs rather than CLDR data on Unix | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |