void UpdateNetworkTime(){
  
   
    // get the result of the date process (should be hh:mm:ss):
  String timeString = date.readString();    
  
  // find the colons:
  int firstColon = timeString.indexOf(":");  
  int secondColon= timeString.lastIndexOf(":");
  int comma = timeString.lastIndexOf(",");

  // get the substrings for hour, minute second:
  String hourString = timeString.substring(0, firstColon); 
  String minString = timeString.substring(firstColon+1, secondColon);
  String secString = timeString.substring(secondColon+1,comma);
  String daystring = timeString.substring(comma+1);
  
  DayofWeek = daystring.toInt();
  // convert to ints,saving the previous second:
  Network_SOD = hourString.toInt()*3600 + minString.toInt() *60 + secString.toInt();
}


