Bug 417282

Summary: Set 24h in System Settings, got 12h in lockscreen
Product: [Unmaintained] kscreenlocker Reporter: markuss <kamikazow>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED WORKSFORME    
Severity: normal CC: erecio, lexlexlex, med.medin.2014, nate, null, plasma-bugs-null, wedge009
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of System Settings
Photo of lockscreen

Description markuss 2020-02-07 19:54:06 UTC
Created attachment 125753 [details]
Screenshot of System Settings

SUMMARY

Set 24h in System Settings, got 12h in lockscreen.

STEPS TO REPRODUCE
1. Set the time format in System Settings to a 24h one
2. Lock the screen

OBSERVED RESULT

8:35 PM

EXPECTED RESULT

20:35

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION

System language is set to US English.
Comment 1 markuss 2020-02-07 19:54:51 UTC
Created attachment 125754 [details]
Photo of lockscreen
Comment 2 David Edmundson 2020-02-08 15:36:59 UTC
Please include output of "env"
Comment 3 markuss 2020-02-09 22:55:41 UTC
(In reply to David Edmundson from comment #2)
> Please include output of "env"

COLORFGBG=0;15
COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-oZbq4VeoIv,guid=424e2aaa65f7bcd418823cd15e404459
DESKTOP_SESSION=plasmawayland
DISPLAY=:0
GDK_BACKEND=x11
GDMSESSION=plasmawayland
GDM_LANG=en_US.UTF-8
GS_LIB=/home/user/.fonts
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/user/.gtkrc-2.0:/home/user/.config/gtkrc-2.0
GTK_RC_FILES=/etc/gtk/gtkrc:/home/user/.gtkrc:/home/user/.config/gtkrc
HOME=/home/user
KDE_FULL_SESSION=true
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
KONSOLE_DBUS_SERVICE=:1.24
KONSOLE_DBUS_SESSION=/Sessions/1
KONSOLE_VERSION=191201
LANG=de_DE.UTF-8
LANGUAGE=en_US
LOGNAME=user
PATH=/home/user/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
PLASMA_USE_QT_SCALING=1
PROFILEHOME=
PWD=/home/user
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_WAYLAND_FORCE_DPI=96
SESSION_MANAGER=local/user-linux:@/tmp/.ICE-unix/2260,unix/user-linux:/tmp/.ICE-unix/2260
SHELL=/usr/bin/fish
SHELL_SESSION_ID=7e313f33a4184f67847dcc9012f816ff
SHLVL=1
TERM=xterm-256color
USER=user
USERNAME=user
WAYLAND_DISPLAY=wayland-0
WINDOWID=0
X11LAYOUT=de
X11MODEL=pc105
X11OPTIONS=terminate:ctrl_alt_bksp
XAUTHLOCALHOSTNAME=user-linux
XAUTHORITY=/run/user/1000/xauth_YLOPHk
XCURSOR_SIZE=36
XCURSOR_THEME=breeze_cursors
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=/home/user/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=plasmawayland
XDG_SESSION_ID=1
XDG_SESSION_TYPE=wayland
XDG_VTNR=2
Comment 4 Nate Graham 2020-02-14 04:38:12 UTC
Looks like LC_TIME isn't there. The formats KCM successfully sets LC_TIME for me, writing it into ~/.config/plasma-localerc as expected. And then start-plasma correctly sets the variables if I look at them with `env | grep -i LC_`.

Can you attach or print the contents of your ~/.config/plasma-localerc file?
Comment 5 David Edmundson 2020-02-14 13:06:51 UTC
There's a difference between the "detailed settings' mode or not.

Without that we don't set LC_TIME. I haven't checked Qt code but the locale KCM makes it look very intentional, and that hasn't changed?
Comment 6 Nate Graham 2020-02-14 13:10:00 UTC
Yes, the KCM makes it very intentional. I had assumed that 
> 1. Set the time format in System Settings to a 24h one
Meant "I clicked on the 'use detailed settings' checkbox and changed the time setting to some locale where 24h time is the default."

KML, can you confirm?
Comment 7 Bug Janitor Service 2020-02-29 04:33:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 markuss 2020-02-29 13:30:33 UTC
There is absolutely no difference whether I also set Detailed Settings to the time format or not.
Comment 9 Nate Graham 2021-03-09 04:42:36 UTC
*** Bug 428333 has been marked as a duplicate of this bug. ***
Comment 10 Wedge009 2021-08-05 13:41:52 UTC
Apologies for not being entirely on topic, but does the lock screen use different language/local settings for its different parts? I also have 24-hour time in system settings, but the lock screen shows 12-hour time followed by <day-of-week>, <day> <month> <year> in English at the top, followed by everything else in the selected Plasma translation.

For the last several months (if not last few years), I've noticed Plasma translations be somewhat inconsistent in application, eg in some systems I'm able to get good translation/localisation coverage, in other systems I get parts that stubbornly remain in US English. (eg the 'waste bin' in Dolphin remains stubbornly called 'trash'.)

Plasma 5.18.7 / 5.22.4
Comment 11 Nate Graham 2023-04-27 21:40:09 UTC
The way we set locates changed in Plasma 5.22 and then again a bit in 5.27; is anyone who was able to reproduce this issue before still able to do so in Plasma 5.27?
Comment 12 Wedge009 2023-04-28 03:02:48 UTC
I'm only on Plasma 5.25 but my lock screen is currently showing 24-hour time, followed by day, dd mmm YYYY. This matches my expectations/preferences.
Comment 13 Wedge009 2023-04-28 03:07:50 UTC
Hmm, doesn't appear that I can edit recently posted comments.

I checked another system (also Plasma 5.25) and the lock screen seems to follow the Formats - System Settings specifications, which (unfortunately, in my opinion) is tied to locale. Time format for en_AU is set to 12-hour, which is what the lock screen follows. To get 24-hour time on my main machine, I mangle my Formats specifications.
Comment 14 Nate Graham 2023-04-28 16:48:28 UTC
Thanks! Sounds like this is now behaving properly for you, Wedge009--or at least within the bounds of what's currently expected giving the limitations of the POSIX locale system.

Markuss, how about you?
Comment 15 Bug Janitor Service 2023-05-13 03:45:59 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 16 Bug Janitor Service 2023-05-28 03:45:25 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 17 Erec 2023-07-16 15:27:00 UTC
╰─$ cat sddm-Clock.qml
// EMR 20230509
// Do a find for Clock.qml: vim $(locate Clock.qml)
// and edit them, the changes are below

...

// text: Qt.formatTime(timeSource.data["Local"]["DateTime"])
text: Qt.formatTime(timeSource.data["Local"]["DateTime"], "hh:mm:ss")

...

// text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate)
text: Qt.formatDate(timeSource.data["Local"]["DateTime"], "yyyy-MM-dd")
Comment 18 Nate Graham 2023-07-16 15:41:56 UTC
That's the SDDM login screen, not the lock screen, so it's a different issue. The issue there is that locale changes need to be set systemwide to take effect in SDDM, since SDDM runs as a different user. This feature is currently being worked on For Plasma 6.