qbittorrent does not observe LC_TIME. #5272

Closed
opened 2026-02-21 17:45:52 -05:00 by deekerman · 16 comments
Owner

Originally created by @ewtoombs on GitHub (Feb 27, 2017).

I have my locale set to LANG=en_GB.UTF-8, but to enable ISO dates, I have set LC_TIME=en_DK.UTF-8. Qbittorrent doesn't understand LC_TIME, though, apparently, since all dates are still in the format dd/mm/yyyy. The versions of qbittorrent and libraries:

qbittorrent b5f81a34cb
qt5-base 5.8.0-3
boost 1.63.0-1
libtorrent-rasterbar 1.0.9

Originally created by @ewtoombs on GitHub (Feb 27, 2017). I have my locale set to LANG=en_GB.UTF-8, but to enable ISO dates, I have set LC_TIME=en_DK.UTF-8. Qbittorrent doesn't understand LC_TIME, though, apparently, since all dates are still in the format dd/mm/yyyy. The versions of qbittorrent and libraries: qbittorrent b5f81a34cb0736b30f8a2f30077204f2ad3c379c qt5-base 5.8.0-3 boost 1.63.0-1 libtorrent-rasterbar 1.0.9
deekerman 2026-02-21 17:45:52 -05:00
  • closed this issue
  • added the
    Qt bugs
    label
Author
Owner

@sledgehammer999 commented on GitHub (Mar 6, 2017):

Your problem is probably affect by github.com/qbittorrent/qBittorrent@75ef6356d3 and should be fixed by #6478.

@sledgehammer999 commented on GitHub (Mar 6, 2017): Your problem is probably affect by https://github.com/qbittorrent/qBittorrent/commit/75ef6356d35eeff2f356e8bb43cc190da3738ba3 and should be fixed by #6478.
Author
Owner

@sledgehammer999 commented on GitHub (Mar 7, 2017):

Fixed in b69b6d1

@sledgehammer999 commented on GitHub (Mar 7, 2017): Fixed in b69b6d1
Author
Owner

@ewtoombs commented on GitHub (Mar 7, 2017):

Wow, that was fast!

@ewtoombs commented on GitHub (Mar 7, 2017): Wow, that was fast!
Author
Owner

@ewtoombs commented on GitHub (Mar 7, 2017):

I just tried version b69b6d1f55. No effect. All dates still aren't in ISO format.

@ewtoombs commented on GitHub (Mar 7, 2017): I just tried version b69b6d1f554066880e296839c2bcbdb9a1b1c2cb. No effect. All dates still aren't in ISO format.
Author
Owner

@sledgehammer999 commented on GitHub (Mar 7, 2017):

Can you git checkout release-3.3.10 and verify that it works there?

@sledgehammer999 commented on GitHub (Mar 7, 2017): Can you `git checkout release-3.3.10` and verify that it works there?
Author
Owner

@ewtoombs commented on GitHub (Mar 7, 2017):

After I do so, will I have to ./configure again? Do I need to make clean?

@ewtoombs commented on GitHub (Mar 7, 2017): After I do so, will I have to ./configure again? Do I need to make clean?
Author
Owner

@sledgehammer999 commented on GitHub (Mar 7, 2017):

its best work on a clean dir and reconfigure.

@sledgehammer999 commented on GitHub (Mar 7, 2017): its best work on a clean dir and reconfigure.
Author
Owner

@ewtoombs commented on GitHub (Mar 7, 2017):

Yep, still broken on release-3.3.10.

@ewtoombs commented on GitHub (Mar 7, 2017): Yep, still broken on release-3.3.10.
Author
Owner

@surfernsk commented on GitHub (Mar 7, 2017):

all work fine
3311
3311_patch

qbittorrent 3.3.11
qt 5.7.1
LANG=ru_RU.UTF-8
LC_TIME=en_US.UTF-8

rebased patch for branch-3.3

@surfernsk commented on GitHub (Mar 7, 2017): all work fine ![3311](https://cloud.githubusercontent.com/assets/2264893/23685905/2e407006-03d9-11e7-889a-77d9203313a1.png) ![3311_patch](https://cloud.githubusercontent.com/assets/2264893/23685916/349e7a92-03d9-11e7-99cb-692b4fdb1843.png) qbittorrent 3.3.11 qt 5.7.1 LANG=ru_RU.UTF-8 LC_TIME=en_US.UTF-8 [rebased patch for branch-3.3](https://build.opensuse.org/package/view_file/home:surfernsk/qbittorrent/QBT-fix_DateTime.patch)
Author
Owner

@ewtoombs commented on GitHub (Mar 8, 2017):

Mine's still broken under similar testing conditions. It must have something to do with en_DK.UTF-8 and ISO dates specifically. It works everywhere else, though, like in Thunderbird.
version: b69b6d1f55
qt: 5.8.0-3
boost-libs: 1.63.0-1

% env | egrep 'LANG|LC_TIME'
LANG=en_GB.UTF-8
LC_TIME=en_DK.UTF-8
% date +%c
2017-03-08T07:39:22 EST
% date +%x             
2017-03-08

(date +%c prints the date and time under the current locale. date +%x prints just the date under the current locale.)
screenshot:
broken dates

@ewtoombs commented on GitHub (Mar 8, 2017): Mine's still broken under similar testing conditions. It must have something to do with en_DK.UTF-8 and ISO dates specifically. It works everywhere else, though, like in Thunderbird. version: b69b6d1f554066880e296839c2bcbdb9a1b1c2cb qt: 5.8.0-3 boost-libs: 1.63.0-1 ``` % env | egrep 'LANG|LC_TIME' LANG=en_GB.UTF-8 LC_TIME=en_DK.UTF-8 % date +%c 2017-03-08T07:39:22 EST % date +%x 2017-03-08 ``` (`date +%c` prints the date and time under the current locale. `date +%x` prints just the date under the current locale.) screenshot: ![broken dates](https://cloud.githubusercontent.com/assets/2224848/23703828/de77a368-03cf-11e7-9f2e-bb5e97b6ff2a.png)
Author
Owner

@ewtoombs commented on GitHub (Mar 8, 2017):

I just tried surfernsk's idea, patching 3.3.11. Still no effect.

@ewtoombs commented on GitHub (Mar 8, 2017): I just tried surfernsk's idea, patching 3.3.11. Still no effect.
Author
Owner

@zeule commented on GitHub (Mar 8, 2017):

The current master work for me in a sense: date format is changing depending on LC_TIME value, but qBt selects not the shortest date format: it uses e.g. "Feb 8 2017" and so on instead of 08-02-2017.

@zeule commented on GitHub (Mar 8, 2017): The current master work for me in a sense: date format is changing depending on `LC_TIME` value, but qBt selects not the shortest date format: it uses e.g. "Feb 8 2017" and so on instead of 08-02-2017.
Author
Owner

@surfernsk commented on GitHub (Mar 8, 2017):

if use Qt::DefaultLocaleShortDate or Qt::SystemLocaleShortDate ... , Qt Ignores some specific locales and use en_EN. en_DK one of them.
code
result:
The date is ISO 2017-03-08
The date is SysS 08.03.17
The date is DefS 08/03/2017
The date is Sys 08.03.17
The date is Loc 08/03/2017
QDate("2017-03-08")
"en_DK"

@ewtoombs As a temporary solution to use Qt::ISODate, instead of :

  • Qt::DefaultLocaleShortDate
  • Qt::SystemLocaleShortDate

patch But this is a bad idea

@surfernsk commented on GitHub (Mar 8, 2017): if use Qt::DefaultLocaleShortDate or Qt::SystemLocaleShortDate ... , Qt Ignores some specific locales and use en_EN. en_DK one of them. [code](http://pastebin.com/JySaFxxz) result: The date is ISO 2017-03-08 The date is SysS 08.03.17 The date is DefS 08/03/2017 The date is Sys 08.03.17 The date is Loc 08/03/2017 QDate("2017-03-08") "en_DK" @ewtoombs As a temporary solution to use Qt::ISODate, instead of : - Qt::DefaultLocaleShortDate - Qt::SystemLocaleShortDate [patch](http://pastebin.com/k3xt7DRF) But this is a bad idea
Author
Owner

@zeule commented on GitHub (Mar 8, 2017):

Then this is a Qt bug and has to be submitted to their bug tracker?

@zeule commented on GitHub (Mar 8, 2017): Then this is a Qt bug and has to be submitted to their bug tracker?
Author
Owner

@surfernsk commented on GitHub (Mar 8, 2017):

@sledgehammer999 Perhaps the best solution will be: adding a single (checkbox) option: use ISO 8601 date/time format (e.g. 2017-02-14 15:22), perhaps with an additional "show seconds in time/date".

@evsh QTBUG-59382

@surfernsk commented on GitHub (Mar 8, 2017): @sledgehammer999 Perhaps the best solution will be: adding a single (checkbox) option: use ISO 8601 date/time format (e.g. 2017-02-14 15:22), perhaps with an additional "show seconds in time/date". @evsh [QTBUG-59382](https://bugreports.qt.io/browse/QTBUG-59382)
Author
Owner

@ewtoombs commented on GitHub (Mar 15, 2017):

I just added to QTBUG-59382. They came to the conclusion that they were doing it right, implying glibc was doing it wrong. Something I doubt very much. Anyway, it turns out running qbittorrent with LC_TIME=en_SE.UTF-8 renders ISO dates just fine. So call that a temporary fix to qt's problem. Anyway, looks like this is an upstream problem with qt.

@ewtoombs commented on GitHub (Mar 15, 2017): I just added to QTBUG-59382. They came to the conclusion that they were doing it right, implying glibc was doing it wrong. Something I doubt very much. Anyway, it turns out running qbittorrent with LC_TIME=en_SE.UTF-8 renders ISO dates just fine. So call that a temporary fix to qt's problem. Anyway, looks like this is an upstream problem with qt.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#5272
No description provided.