Avoid showing wrong timezone suffix in krunner time

Authored by rthomas on May 8 2017, 3:05 PM.



Krunner is suffixing the local timezone when asked for the time of other regions. QLocale doesn't provide a way to set the locale based only on the country (which is provided by QDateTime), so it would be better if we just use the short time format and avoid showing the timezone altogether.

  • Current time in my zone

  • Before Patch

  • After Patch

Diff Detail

R114 Plasma Addons
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
rthomas created this revision.May 8 2017, 3:05 PM
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptMay 8 2017, 3:05 PM
davidedmundson accepted this revision.May 8 2017, 3:39 PM

There's also the option of doing dt.setTimezone()
but then we'd have to remove the current code doing the timezone adjustments, as we'd end up adjusting it twice.

Do you have commit access?

This revision is now accepted and ready to land.May 8 2017, 3:39 PM

I couldn't find a reasonable way to set the timezone from the returned country, so I think it's best to avoid it for now.

I don't have commit access, David. This is the first time I'm working on the kdeplasma-addons repository. Please commit it on my behalf.

This revision was automatically updated to reflect the committed changes.