Bug 483045 - Incorrect time for some time zones in Digital Clock during DST switch that affects countries at different dates
Summary: Incorrect time for some time zones in Digital Clock during DST switch that af...
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (show other bugs)
Version: 6.0.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-09 22:30 UTC by nkwkelvin
Modified: 2024-03-11 23:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Correct time is shown on command line, but incorrect timt is shown on Digital Clock (378.58 KB, image/png)
2024-03-09 22:30 UTC, nkwkelvin
Details

Note You need to log in before you can comment on or make changes to this bug.
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!