Results 1 to 2 of 2

Thread: [SOLVED] Changing time and date format on sddm login/lock screen

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,335

    Default [SOLVED] Changing time and date format on sddm login/lock screen

    This apply to my configuration

    KDE Frameworks 5.55.0
    Qt 5.9.7 (built against 5.9.7)
    kf5-config: 1.0
    The xcb windowing system

    plasmashell 5.12.8

    Leap 15.1
    kernel 4.12.14-lp151.28.48-default

    Documentations :

    After reading this :
    https://askubuntu.com/questions/7831...24-hour-format

    which cites also :
    Wrong time format in plasma5 lock screen
    https://forum.kde.org/viewtopic.php?f=289&t=130484

    Searching in internet I found this about Qt date time format
    https://doc.qt.io/qt-5/qdatetime.html#toString

    -------------------------------------

    Current 'look and feel' theme : opensuse
    Configuration files in : /usr/share/plasma/look-and-feel/org.openSUSE.desktop

    As ROOT after having done a backup just in case, edit the current running theme file : /usr/share/plasma/look-and-feel/org.openSUSE.desktop/contents/components/Clock.qml

    To change the time from the standard format to hh:mm:ss 24h clock
    find a line like :
    Code:
    text: Qt.formatTime(timeSource.data["Local"]["DateTime"])
    change to :
    Code:
    text: Qt.formatTime(timeSource.data["Local"]["DateTime"], "hh:mm:ss")
    To change the date from the default locale long date format to yyyy/mm/dd
    find a line like :
    Code:
    text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate);
    change to :
    Code:
    text: Qt.formatDate(timeSource.data["Local"]["DateTime"], "yyyy/MM/dd");
    Hit Ctrl+Alt+L to lock your screen and see the change immediately.

    This should be applied on each other theme in the folder /usr/share/plasma/look-and-feel if wanted.

    I hope it helps someone.
    Thanks for helping. JCD
    __________
    server leap 15.3 -- ASUS g75vw KDE leap 15.3 -- ASUS G731GV KDE leap 15.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - HP 9012E

  2. #2
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,335

    Default Re: [SOLVED] Changing time and date format on sddm login/lock screen

    Detail on date time format can be found here :
    Code:
    The format specification is described at Qt.formatDateTime.
    Note I have forgotten :
    Upgrades will overwrite the changes to the Breeze SDDM theme. A better way is copy the Breeze theme under another name.
    And this is true for any theme for any distrib.
    Thanks for helping. JCD
    __________
    server leap 15.3 -- ASUS g75vw KDE leap 15.3 -- ASUS G731GV KDE leap 15.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - HP 9012E

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •