[digital-clock] Fix display of seconds with certain locales

Review Request #127623 - Created April 10, 2016 and submitted

Information
Wolfgang Bauer
plasma-workspace
Plasma/5.6, master
Reviewers
plasma
broulik, mklapetek

Currently, "Show Seconds" has no effect with certain locales (C e.g.) that already contain the seconds in the ShortFormat.
The reason is that the seconds are only added to the format string that's used to display the time if they are not part of timeFormatString already (which is not used at all for the display).

This patch fixes that check and adds them only depending on the showSeconds config option.

Switch locale to C, seconds are shown now or not, depending on the applet's configuration, they were not shown before even when enabled.
It still behaves as expected with my standard locale (de_AT).

Wolfgang Bauer
Marco Martin
Wolfgang Bauer
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit a7a22de14c360fa5c975e0bae30fc22e4cd7cc43 by Wolfgang Bauer to branch Plasma/5.6.
Loading...