diff --git a/mbtk/liblynq_lib/src/lynq_time.c b/mbtk/liblynq_lib/src/lynq_time.c
index 8427174..71fd9e3 100644
--- a/mbtk/liblynq_lib/src/lynq_time.c
+++ b/mbtk/liblynq_lib/src/lynq_time.c
@@ -54,8 +54,6 @@
 
 
 
-
-
 //int req_time_set(int type, char *time, int *cme_err);
 static int metis_strptime(char *str_time)
 {
@@ -83,11 +81,15 @@
 
 
 
-static void* ntp_pthread_run()
+static void* ntp_pthread_run(int* ntp_flag)
 {
     if (mbtk_net_state_get() == MBTK_NET_STATE_OFF) 
     {
         printf("Network is disconnected. Set time fail.");
+        if(NULL != ntp_flag)
+       {
+            *ntp_flag = -1;
+       }
         return NULL;
     }
     printf("Network is connected.");
@@ -103,6 +105,10 @@
             if((time = (time_t)mbtk_at_systime()) == 0) 
             {
                 printf("NTP client fail!\n");
+                if(NULL != ntp_flag)
+                {
+                     *ntp_flag = -1;
+                }
                 return NULL;
             }
             struct tm *tm_t;
@@ -118,6 +124,10 @@
 
         sleep(64); // Sleep 64s.
     }
+    if(NULL != ntp_flag)
+    {
+         *ntp_flag = 0;
+    }
     return NULL;
 }
 
@@ -153,10 +163,18 @@
 int ntp_sync_time(int enable)
 {
     UNUSED(enable);
+    int ntp_status = 0;
     if(enable)
     {
-        set_time_type(LYNQ_TIME_TYPE_NTP);
-        ntp_pthread_run();
+        ntp_pthread_run(&ntp_status);
+        if(ntp_status == 0)
+        {
+            set_time_type(LYNQ_TIME_TYPE_NTP);
+        }
+        else
+        {
+            set_time_type(LYNQ_TIME_TYPE_UNUSE);
+        }
     }
     else
     {
@@ -243,19 +261,31 @@
 
     type = atoi(time_type);
     printf("time_type :%d", type);
-    if(type == LYNQ_TIME_TYPE_NTP){
+    if(type == LYNQ_TIME_TYPE_NTP)
+    {
         time_src->ntp = 1;
-    }else if(type == LYNQ_TIME_TYPE_CELL){
+        time_src->nitz = 0;
+        time_src->gnss = 0;
+    }
+    else if(type == LYNQ_TIME_TYPE_CELL)
+    {
+        time_src->ntp = 0;
         time_src->nitz = 1;
-    }else if(type == LYNQ_TIME_TYPE_GNSS){
+        time_src->gnss = 0;
+    }
+    else if(type == LYNQ_TIME_TYPE_GNSS)
+    {
+        time_src->ntp = 0;
+        time_src->nitz = 0;
         time_src->gnss = 1;
-    }else if(type == LYNQ_TIME_TYPE_UNUSE){
+    }
+    else if(type == LYNQ_TIME_TYPE_UNUSE)
+    {
         time_src->ntp = 0;
         time_src->nitz = 0;
         time_src->gnss = 0;
-    }else{
-
     }
+
     return 0;
 }
 
