Index: /branches/rel_apv_10_7_2/usr/click/bin/backend/sys_cmd.c
===================================================================
--- /branches/rel_apv_10_7_2/usr/click/bin/backend/sys_cmd.c	(revision 39186)
+++ /branches/rel_apv_10_7_2/usr/click/bin/backend/sys_cmd.c	(working copy)
@@ -560,27 +560,36 @@
 	return (0);
 }
 
-int
-ui_showdate()
+int 
+ui_showdate(void)
 {
-	char		buf[BUFSIZ], *format = "%a %b %d %T %Z (%z) %Y";
-	time_t		*now;
-	struct tm	*tm;
-	size_t 		len;
-	int ret = 0;
-
-	settimezone();
-	ret = kern_get_timer(&now, &len);
-	if (ret != 0) {
-		printf("System busy. Failed to execute the command. Please retry.");
-		return (-1);
-	}
-	tm = localtime(now);
-	free(now);
-	strftime(buf, BUFSIZ, format, tm);
-	printf("%s", buf);
+    char buf[BUFSIZ];
+    const char *format = "%a %b %d %T %Z (%z) %Y";
+    time_t now;
+    struct tm *tm;
 
-	return (0);
+    // Get current time
+    now = time(NULL);
+    if (now == (time_t)-1) {
+        printf("Failed to get current time.\n");
+        return -1;
+    }
+
+    // Convert to local time
+    tm = localtime(&now);
+    if (!tm) {
+        printf("Failed to convert time to local time.\n");
+        return -1;
+    }
+
+    // Format and print the time
+    if (strftime(buf, sizeof(buf), format, tm) == 0) {
+        printf("Failed to format time.\n");
+        return -1;
+    }
+
+    printf("%s\n", buf);
+    return 0;
 }
 
 int
