 
 void syncRTCReceived(String resp)
 {
-  //String resp = "SyncRTC: "2016-4-10T21:00";
-  int idxStart=12;  
+  //String resp = "SyncRTC:"2016-4-10T21:00";
+  int idxStart=10;  
   int idxEnd = resp.indexOf("-", idxStart);
   year = resp.substring(idxStart,idxEnd).toInt();  
 

byte day = 10;
byte month = 4;
byte year = 16;

///*** RTCZero Config ***///



  // close any connection before send a new request.
  // This will free the socket on the WiFi shield
  postingClient.stop();

  // if there's a successful connection:
  if (postingClient.connect(hostname, 443)) {
    //make the GET request to the Azure IOT device feed uri
    postingClient.print("POST ");  //Do a POST
    postingClient.print(senduri);  // On the sendURI
    postingClient.println(" HTTP/1.1"); 
    postingClient.print("Host: "); 
    postingClient.println(hostname);  //with hostname header
    postingClient.print("Authorization: ");
    postingClient.println(authSAS);  //Authorization SAS token obtained from Azure IoT device explorer
    postingClient.println("Connection: close");
    postingClient.println("Content-Type: text/plain");
    postingClient.print("Content-Length: ");
    postingClient.println(content.length());
    postingClient.println();
    postingClient.println(content);
    postingClient.println();

    Serial.println("---"); 
    Serial.println("service call to azure successful!");
    Serial.println("azureHttpPost");
    Serial.println(senduri); 
    Serial.println(content);            
    Serial.println("---");     
    return true;
  }
  else {
    // if you couldn't make a connection:
    Serial.println("---"); 
    Serial.println("connection to azure webservice failed");
    Serial.println("azureHttpPost");
    Serial.println(senduri);
    Serial.println(content); 
    Serial.println("---"); 
    reconnetWifi();
    return false;
  }
}

void loop(){ 
  val = digitalRead(MKR1000_PINPIR1);   // read input value
  if (val == HIGH) {                    // check if the input is HIGH
    digitalWrite(MKR1000_LED, HIGH);    // turn LED ON    
