 
 static void display_time(time_t &epoch) {
   char buf[32];
-  strftime(buf, sizeof(buf), metric? "%H:%S": "%I:%S%p", localtime(&epoch));
+  strftime(buf, sizeof(buf), cfg.metric? "%H:%S": "%I:%S%p", localtime(&epoch));
   tft.setCursor(centre_text(buf, tft.width()/2, 1), 109);
   tft.print(buf);
   strftime(buf, sizeof(buf), "%a %d", localtime(&epoch));

#ifdef DEBUG  
  out.println();
  out.print(F("Connected to "));
  out.println(ssid);
  out.println(WiFi.localIP());
#endif
  tft.println();

  f.readBytes(buf, sizeof(buf));
  char *b = buf, *p = strsep(&b, "=");
  while (p) {
#ifdef DEBUG
    out.println(p);
#endif
    if (strcmp(p, "ssid") == 0)
      strncpy(cfg.ssid, strsep(&b, "\n"), sizeof(cfg.ssid));
    else if (strcmp(p, "password") == 0)
      strncpy(cfg.password, strsep(&b, "\n"), sizeof(cfg.password));
    else if (strcmp(p, "key") == 0)
      strncpy(cfg.key, strsep(&b, "\n"), sizeof(cfg.key));
    else if (strcmp(p, "station") == 0)
      strncpy(cfg.station, strsep(&b, "\n"), sizeof(cfg.station));
    else if (strcmp(p, "conditions_interval") == 0)
      cfg.conditions_interval = 1000*atoi(strsep(&b, "\n"));
    else if (strcmp(p, "forecasts_interval") == 0)
      cfg.forecasts_interval = 1000*atoi(strsep(&b, "\n"));
    else if (strcmp(p, "metric") == 0)
      cfg.metric = (bool)atoi(strsep(&b, "\n"));
    else if (strcmp(p, "display") == 0)
      cfg.on_time = 1000*atoi(strsep(&b, "\n"));
    else if (strcmp(p, "bright") == 0)
      cfg.bright = atoi(strsep(&b, "\n"));
    else if (strcmp(p, "dim") == 0)
      cfg.dim = atoi(strsep(&b, "\n"));
    p = strsep(&b, "=");
  }
  f.close();

  fade = cfg.bright;
  analogWrite(TFT_LED, fade);

  tft.println(F("Weather Guy (c)2017"));
  tft.println();
  tft.print(F("ssid: "));
  tft.println(cfg.ssid);
  tft.print(F("password: "));
  tft.println(cfg.password);
  tft.print(F("key: "));
  tft.println(cfg.key);
  tft.print(F("station: "));
  tft.println(cfg.station);
  tft.print(F("condition...: "));
  tft.println(cfg.conditions_interval);
  tft.print(F("forecast...: "));
  tft.println(cfg.forecasts_interval);
  tft.print(F("display: "));
  tft.println(cfg.on_time);
  tft.print(F("metric: "));
  tft.println(cfg.metric);
  tft.print(F("bright: "));
  tft.println(cfg.bright);
  tft.print(F("dim: "));
  tft.println(cfg.dim);

  WiFi.mode(WIFI_STA);
  WiFi.begin(cfg.ssid, cfg.password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    out.print(F("."));
