[Feature][ZXW-41] merged 0601 version

Change-Id: I667af6bb09d65581d455b73f8984c160b2c67ad8
diff --git a/ap/app/zte_comm/rtc-service/rtc-service.c b/ap/app/zte_comm/rtc-service/rtc-service.c
index c5baf65..481c550 100755
--- a/ap/app/zte_comm/rtc-service/rtc-service.c
+++ b/ap/app/zte_comm/rtc-service/rtc-service.c
@@ -364,6 +364,26 @@
 }
 
 /********************************************
+ * ¹¦ÄÜ:sntpͬ²½ÏµÍ³Ê±¼ä
+ *******************************************/
+static int handle_sntp_update(MSG_BUF *pmsg_buf)
+{
+    time_t os_time = 0;
+	struct timeval time_tv = {0};
+	int ret = 0;
+
+	memcpy(&os_time, pmsg_buf->aucDataBuf, sizeof(time_t));
+
+	time_tv.tv_sec = os_time;
+	ret = settimeofday(&time_tv,NULL);
+	if(ret!=0)
+	{
+		slog(RTC_PRINT, SLOG_ERR, "handle_sntp_update is fail,ret:%d \n",ret);
+	}
+	return 0;
+}
+
+/********************************************
  * ¹¦ÄÜ:Ôö¼Ó¶¨Ê±Æ÷
  *******************************************/
 static int handle_alarm_add(MSG_BUF *pmsg_buf)
@@ -908,6 +928,9 @@
 		handle_set_time(pmsg_buf);
 		update_alarm();
 		break;
+	case RTC_MSG_SNTP_UPDATE:
+		handle_sntp_update(pmsg_buf);
+		break;
 	case RTC_MSG_ADD_ALARM:
 		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_ADD_ALARM, src:0x%x, g_clean_flag = %d.\n", pmsg_buf->src_id, g_clean_flag);
 		//Ìí¼ÓrtcǰÏÈɾ³ý´Ërtc_idÒÑÌí¼Ó¼Ç¼£¬Ã¿¸örtc_idÖ»±£Áô1¸ö¶¨Ê±Æ÷