   char dateTime[17];
   memset(dateTime, 0, 17);
   dateTime8601(dt.year(), dt.month(), dt.day(), dt.hour(), dt.minute(), dt.second(), dateTime);
+  
   // Set date to just the year month and day of the ISO8601 simple date string.
   char date[9];
   memset(date, 0, 9);
   memcpy(date, dateTime, 8);
+  
   // Set currentTimeStr to the string value of the current unix time (seconds since epoch).
   char currentTimeStr[8*sizeof(unsigned long)+1];
   memset(currentTimeStr, 0, 8*sizeof(unsigned long)+1);

  }
  
  // Read data until either the connection is closed, or the idle timeout is reached.
  Serial.println(F("Elasticsearch response:"));
  unsigned long lastRead = millis();
  while (www.connected() && (millis() - lastRead < TIMEOUT_MS)) {
    while (www.available()) {
      char c = www.read();

  return ((data[1] << 8) + data[0]) * 0.0625;
}

void dbWrite(unsigned long currentTime, float currentTemp) {
  // Generate time and date strings
  DateTime dt(currentTime);
