 
 DateTime now = DateTime(0);
 
+/**
+ * converts a three letter english abbreviation for a month into the months number
+ */
 uint8_t parseMonth (char *mo) {
   if (!strcmp(mo, "Jan")) {
     return 1;

  }

  // try to read the Date line in the http headers
  char line[256];
  size_t pos = 0;
  bool wehaveadate = 0;
  unsigned long lastRead = millis();
  while (www.connected() && (millis() - lastRead < IDLE_TIMEOUT_MS)) {
    while (www.available()) {
      char c = www.read();
      if (c == '\n') { // we've reached a newline
        line[pos++] = 0;
        pos = 0;
        // now we need to see whether this is the 'Date:' line
        if (line[0] == 'D' &&
            line[1] == 'a' &&
            line[2] == 't' &&
            line[3] == 'e' &&
            line[4] == ':') { // seriously? TODO: fix this shit
          wehaveadate = 1;
        }
      } else if (!wehaveadate) { // if we haven't reached a newline, put it in the buffer
        line[pos] = c;
        line[pos + 1] = 0;
        pos++;
      }
      lastRead = millis();

  }
 
  lcd.setCursor(0,3);
  lcd.print(now.year()); lcd.print('-');
  lcd.print(now.month()); lcd.print('-');
  lcd.print(now.day()); lcd.print(' ');
  lcd.print(now.hour()); lcd.print(':');
  lcd.print(now.minute()); lcd.print(':');
  lcd.print(now.second());
}
