Bug 483045

Summary: Incorrect time for some time zones in Digital Clock during DST switch that affects countries at different dates
Product: [Plasma] plasmashell Reporter: nkwkelvin
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: andrewm.finewolf, nate
Priority: NOR Keywords: qt6
Version First Reported In: 6.0.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Correct time is shown on command line, but incorrect timt is shown on Digital Clock

Description nkwkelvin 2024-03-09 22:30:25 UTC
Created attachment 166834 [details]
Correct time is shown on command line, but incorrect timt is shown on Digital Clock

SUMMARY
The time shown for some time zones are incorrect in Digital Clock. I have tried Hong Kong (UTC+8) and Tokyo (UTC+9) which are incorrect. But I also tried New York (UTC-5), London (UTC) and Moscow (UTC+3) which are all correct. This looks very random.

This happens only after I updated to Plasma 6.0.1. (I updated directly from Plasma 5 to 6.0.1, so I am not sure if the bug exists in 6.0.0.)


STEPS TO REPRODUCE
1. In digital clock, configure it to show Hong Kong time or Tokyo time.
2. Open the pop up

OBSERVED RESULT
Incorrect time is shown.

EXPECTED RESULT
Correct time is shown.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Comment 1 nkwkelvin 2024-03-09 22:38:53 UTC
UTC+0, +1, +2, +3 are all correct. But everything starting from UTC+3:30 are all incorrect (1 hour ahead of correct time).
Comment 2 nkwkelvin 2024-03-10 03:17:35 UTC
I have figured that this is due to a bug in handling daylight saving time. In the US (my current location), daylight saving time will start on March 10, but other regions do not. The digital clock somehow incorrectly assumed that all regions in the world will follow the same daylight saving time rule of the US and so advanced their clocks by 1 hour once their local time is after March 10 2 am (which is when US daylight saving time starts).
Comment 3 Nate Graham 2024-03-11 23:26:33 UTC
Freaking daylight savings time. Let's just get rid of it...

This is very likely a Qt bug, as we don't do any DST handling ourselves. Possibly even an ICU bug, but I think that's less likely. Please report it to https://bugreports.qt.io/ and then paste a link to it here in the URL field. Thanks!
Comment 4 Filip 2025-10-05 18:04:40 UTC
*** Bug 510247 has been marked as a duplicate of this bug. ***