<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>498379</bug_id>
          
          <creation_ts>2025-01-08 08:11:29 +0000</creation_ts>
          <short_desc>Digital Clock Widget time zones randomly arranged</short_desc>
          <delta_ts>2025-01-09 18:15:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>Digital Clock widget</component>
          <version>6.2.5</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="pallaswept">pallaswept</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/-/commit/eb53e3c3af8591a59b98301b231adb32f4333547</cf_commitlink>
          <cf_versionfixedin>6.3.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2387662</commentid>
    <comment_count>0</comment_count>
    <who name="pallaswept">pallaswept</who>
    <bug_when>2025-01-08 08:11:29 +0000</bug_when>
    <thetext>SUMMARY
I have several time zones added to my clock widget. They are shown in a list when I hover the widget in my panel. That list is usually sorted by the time / latitude at that location, which is very useful. 

Since recently (probably updating to 6.2.5), the list seems randomly ordered. At first I thought it was alphabetical, and wasn&apos;t sure this was a bug, but after rebooting, it&apos;s definitely not sorted by time, latitude or name. I&apos;ve just now noticed that it is actually different sorting to when I started typing this post a few minutes ago. Pretty sure bug?

STEPS TO REPRODUCE
1. Add time zones to Digital Clock widget in panel
2. Hover widget
3. Bonus: Try scrolling the mouse wheel while hovering

OBSERVED RESULT
You are lost

EXPECTED RESULT
West is that way ^

SOFTWARE/OS VERSIONS

Operating System: openSUSE Tumbleweed 20250103
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2387782</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2025-01-08 16:53:55 +0000</bug_when>
    <thetext>Can reproduce; the order changes randomly every time plasma is started. It&apos;s supposed to be sorted by time IIRC.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2387827</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2025-01-08 19:43:11 +0000</bug_when>
    <thetext>I can&apos;t find any code change that might have caused this, so it&apos;s possible it happened with a Qt update. That theory is bolstered by the fact that I can&apos;t even find any existing code to keep the ordering consistent! So we may have been relying on accidental behavior that changed recently.

Explicitly sorting by name isn&apos;t too hard, but I think sorting by time would be better. I&apos;ll work on that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2387838</commentid>
    <comment_count>3</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2025-01-08 20:45:26 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5041</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2387852</commentid>
    <comment_count>4</comment_count>
    <who name="pallaswept">pallaswept</who>
    <bug_when>2025-01-08 21:12:14 +0000</bug_when>
    <thetext>Mid-air collision detected!
Someone else has made changes to bug 498379 at the same time you were trying to. The changes made were: 

Nate fixed it already before you could even say &quot;Thanks Nate!&quot;

:D</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2388100</commentid>
    <comment_count>5</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2025-01-09 17:56:01 +0000</bug_when>
    <thetext>Git commit a6b7e945e0f9ca7919ad5a3453732232e9497f8c by Nate Graham.
Committed on 09/01/2025 at 16:21.
Pushed by ngraham into branch &apos;master&apos;.

applets/digital-clock: explicitly sort time zones by time

Otherwise the list gets sorted randomly.
FIXED-IN: 6.3.0

M  +2    -1    applets/digital-clock/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/a6b7e945e0f9ca7919ad5a3453732232e9497f8c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2388107</commentid>
    <comment_count>6</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2025-01-09 18:15:22 +0000</bug_when>
    <thetext>Git commit eb53e3c3af8591a59b98301b231adb32f4333547 by Nate Graham.
Committed on 09/01/2025 at 17:56.
Pushed by ngraham into branch &apos;Plasma/6.3&apos;.

applets/digital-clock: explicitly sort time zones by time

Otherwise the list gets sorted randomly.
FIXED-IN: 6.3.0


(cherry picked from commit a6b7e945e0f9ca7919ad5a3453732232e9497f8c)

Co-authored-by: Nate Graham &lt;nate@kde.org&gt;

M  +2    -1    applets/digital-clock/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/eb53e3c3af8591a59b98301b231adb32f4333547</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>