Bug 330813 - Show Seconds config option does not actually alter whether seconds are shown
Summary: Show Seconds config option does not actually alter whether seconds are shown
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock (show other bugs)
Version: master
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.0
Assignee: Martin Klapetek
URL:
Keywords:
Depends on:
Blocks: 328586
  Show dependency treegraph
 
Reported: 2014-02-05 18:39 UTC by David Edmundson
Modified: 2014-02-06 17:57 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2014-02-05 18:39:28 UTC
Show Seconds config option does not actually alter whether seconds are shown.
It does update the dataengine refresh timing so the config part is working.

    function timeFormatCorrection(timeFormatString) 

must be broken.
Comment 1 Martin Klapetek 2014-02-05 23:46:28 UTC
Works fine here. Even tried with different locales - en_US, en_GB and cs_CZ are all fine.

What's your locale? Can you put "print(timeFormatString);" after line 148 and post the output please?
Comment 2 David Edmundson 2014-02-05 23:52:56 UTC
at start of function
HH:mm:ss

at end of function

HH:mm:ss t
Comment 3 David Edmundson 2014-02-05 23:55:51 UTC
oh! my short format is providing seconds.
So I never hit your crazy regex which adds them.

and there's no code to remove it if they're not meant to be on.


How do I find out my locale?
Comment 4 Martin Klapetek 2014-02-06 00:12:14 UTC
Interesting. I checked the full list of locales on my system, none of them was returning :ss so I assumed it would be safe.

You can print Qt.locale().uiLanguages - the first one should be your current locale.
Comment 5 David Edmundson 2014-02-06 00:17:14 UTC
That returned one thing.

"[C]"
Comment 6 Martin Klapetek 2014-02-06 00:25:07 UTC
C is the POSIX locale, Qt(Quick) sets it when it gets an invalid locale passed to it, basically it's a fallback and should never be used as default.

Means your system is misconfigured.

But I'll extend the code to handle this case too.
Comment 7 Martin Klapetek 2014-02-06 17:57:02 UTC
Git commit 7a7ca1e18f5d96799913f4854176aea422ee3848 by Martin Klapetek.
Committed on 06/02/2014 at 17:44.
Pushed by mklapetek into branch 'master'.

[plasma/digital-clock] Make sure we don't show seconds when disabled

REVIEW: 115513

M  +5    -0    plasma/generic/applets/digital-clock/contents/ui/DigitalClock.qml

http://commits.kde.org/kde-workspace/7a7ca1e18f5d96799913f4854176aea422ee3848