After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732021 - Automatic Date & Time row is displayed even if NTP is unavailable
Automatic Date & Time row is displayed even if NTP is unavailable
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Date and Time
git master
Other All
: Normal normal
: ---
Assigned To: Kalev Lember
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-21 22:37 UTC by Michael Catanzaro
Modified: 2014-06-23 16:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
datetime: fix check for CanNTP (2.82 KB, patch)
2014-06-21 22:37 UTC, Michael Catanzaro
accepted-commit_now Details | Review
datetime: check CanNTP when initializing the panel (2.83 KB, patch)
2014-06-23 16:50 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2014-06-21 22:37:46 UTC
The datetime panel has logic to hide the Automatic Date & Time row if NTP is unavailable (based on timedated's CanNTP property), but this logic is broken and the row is displayed unconditionally.
Comment 1 Michael Catanzaro 2014-06-21 22:37:48 UTC
Created attachment 278917 [details] [review]
datetime: fix check for CanNTP

If the system does not support NTP (as determined by the presence of an
NTP unit in /usr/lib/systemd/ntp-units.d), the Automatic Date & Time row
is intended to be hidden. We respond to changes to timedated's CanNTP
property, but we never account for the initial state of the property,
so we wind up displaying the Automatic Date & Time row even though the
switch is guaranteed to be broken.

Check CanNTP when initializing the panel to fix this.
Comment 2 Rui Matos 2014-06-23 12:00:37 UTC
Review of attachment 278917 [details] [review]:

Code looks fine, thanks.

Please make the patch summary more explicit, something like:

datetime: Check CanNTP when initializing the panel
Comment 3 Michael Catanzaro 2014-06-23 16:50:20 UTC
Created attachment 279055 [details] [review]
datetime: check CanNTP when initializing the panel

If the system does not support NTP (as determined by the presence of an
NTP unit in /usr/lib/systemd/ntp-units.d), the Automatic Date & Time row
is intended to be hidden. We respond to changes to timedated's CanNTP
property, but we never account for the initial state of the property,
so we wind up displaying the Automatic Date & Time row even though the
switch is guaranteed to be broken.

Check CanNTP when initializing the panel to fix this.
Comment 4 Michael Catanzaro 2014-06-23 16:51:08 UTC
Thanks

Attachment 279055 [details] pushed as c865480 - datetime: check CanNTP when initializing the panel