Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/models/system/time.py
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/models/system/time.py	(revision 2565)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/models/system/time.py	(working copy)
@@ -1,6 +1,20 @@
 from hive.imports.model import *
 from django.utils.translation import ugettext_lazy as _
 from datetime import datetime
+import subprocess
+
+
+def run_command(command):
+    """Run a shell command and return the output, error, and exit code."""
+    try:
+        process = subprocess.Popen(command, shell=True,
+                                   stdout=subprocess.PIPE,
+                                   stderr=subprocess.PIPE)
+        stdout, stderr = process.communicate()
+        return_code = process.returncode
+        return stdout.strip(), stderr.strip(), return_code
+    except Exception as e:
+        return "", str(e), -1
 
 
 class TimeSettings(ANModel):
@@ -32,15 +46,15 @@
 
         def _update_system_time(self, instance):
             time_str = instance.get_attr_raw("system_time")[:19]  # '2014-03-28T06:59:52'
-            date = datetime.strptime(time_str, '%Y-%m-%dT%H:%M:%S')
+            date_obj = datetime.strptime(time_str, '%Y-%m-%dT%H:%M:%S')
             self.cli.set_config()
-            self.cli.cmd('date --set="%s"' % (date.strftime('%Y-%m-%d %H:%M:%S')),
-                         BlankParser(nonblank_exception=CLICmdError, supplement=True))
-            self.cli.cmd('hwclock --set --date="%s"' % (date.strftime('%Y-%m-%d %H:%M:%S')),
-                         BlankParser(nonblank_exception=CLICmdError, supplement=True))
-            self.cli.cmd('systemctl restart crond',
-                         BlankParser(nonblank_exception=CLICmdError, supplement=True))
-
+            date_str = date_obj.strftime('%Y-%m-%d %H:%M:%S')
+            sysclock_cmd = 'date --set="%s"' % date_str
+            hwclock_cmd = 'hwclock --set --date="%s"' % date_str
+            restart_cmd = 'systemctl restart crond'
+            sysclock_result = run_command(sysclock_cmd)
+            hwclock_result = run_command(hwclock_cmd)
+            restart_result = run_command(restart_cmd)
             return
 
         def _get_system_timezone(self):
@@ -65,4 +79,5 @@
         def _perform_Clear_timezone(self, options):
             self.cli.set_config()
             result = self.cli.cmd('clear system timezone')
-            return result
\ No newline at end of file
+            return result
+
