[Bugfix][T106BUG-183] Fix the issue that the user_set_time function would modify RTC.
Only Configure:No
Affected branch:master
Affected module:systime
Is it affected on both ZXIC and MTK: Yes
Self-test: Yes
Doc Update: No
Change-Id: I7d66e04336e07d6295f747b968c3ca867ef9998b
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
index 6b7351b..8eaba2a 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
@@ -44,13 +44,13 @@
#define NTP_STOP_BUF "/etc/init.d/sntp stop"
#define NTP_START_BUF "/etc/init.d/sntp start"
#define PGREP_NTP_DARMON "pgrep -x /usr/bin/sntp"
-#define SET_RTC() lynq_set_rtc_time()
+
#else
#define NTP_RESTART_BUF "systemctl restart ntpd"
#define NTP_STOP_BUF "systemctl stop ntpd"
#define NTP_START_BUF "systemctl start ntpd"
#define PGREP_NTP_DARMON "pgrep ntpd"
-#define SET_RTC() system("hwclock -w -f /dev/rtc0")
+
#endif
#ifdef MOBILETEK_TARGET_PLATFORM_T106
@@ -280,9 +280,6 @@
// set systime
snprintf(cmd_buf, sizeof(cmd_buf), "date -s %s+%s", date, time);
system(cmd_buf);
-
- // set RTC by macrofunction
- SET_RTC();
return 0;
}