-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config.DateLocale does not format forecast date and time #141
Comments
Found an issue QT backend changes locale
That shows that the locale has been reset after the definition of the Qapplication:
Added a setlocale after
As I have no experience with QT: does anyone know a way to tell QApplication to use the current locale on the definition? |
BertLindeman
added a commit
to BertLindeman/PiClock
that referenced
this issue
Mar 16, 2019
Fix n0bel#141 "Config.DateLocale does not format forecast date and time" Fix part of n0bel#125 "Text layout issues": 1. Put all date/time format strings in the config (with appropriate defaults in the startup area so old configs still work) Made some records in Config-Example.py shorter than 80 chars.
BertLindeman
added a commit
to BertLindeman/PiClock
that referenced
this issue
Mar 16, 2019
Fix n0bel#122 "does not work with regional settings" Fix part of n0bel#125 "Text layout issues": 1. Put all date/time format strings in the config (with appropriate defaults in the startup area so old configs still work) Fix n0bel#141 "Config.DateLocale does not format forecast date and time" Made some records in Config-Example.py shorter than 80 chars.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have been busy trying to debug #122.
Conclusion sofar: date and time in the forecast boxes are formatted using the locale that is active at the start of the clock. The Config.DateLocale has no grip on this.
Added a few debug lines to the clock to see the locale being used.
Running host with
LC_TIME="en_US.UTF-8"
Started the clock thus as dutch locale:
LC_TIME=nl_NL.utf8 python PyQtPiClock.py Config-xenon462
In Config-xenon462.py:
Part of the output:
I do not have enough python background to understand apparently.
In the mainline we see ru_RU.utf8 being set as LC_TIME (shown as 2).
And yet nl_NL is used for the forecasts.
So I do not understand. . . . .
Secondary thought. is the locale set too many times?
My thought would be ONCE should be enough.
The text was updated successfully, but these errors were encountered: