datetime: Don't expect synced time in diagnostics inside VMs

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-05-02 18:37:20 -07:00 committed by James Valleroy
parent 57daf338c8
commit ce23f07e92
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -82,7 +82,9 @@ class DateTimeApp(app_module.App):
def diagnose(self):
"""Run diagnostics and return the results."""
results = super().diagnose()
results.append(_diagnose_time_synchronized())
if self._is_time_managed():
results.append(_diagnose_time_synchronized())
return results