aboutsummaryrefslogtreecommitdiff
path: root/datetimeHandler.cpp
blob: 6e5abd5cacdf25f33e3db71a9f9796ae0b3e098d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "datetimeHandler.h"

uint8_t localTemp = 255;
uint8_t localHum = 255;
uint8_t hour = 0;
uint8_t minute = 0;
uint8_t time_tab[6] = {'-', '-', ':', '-', '-', 0};

void setTime(String time)
{
  if(time.length() == 8)
  {
    hour = time.substring(0,2).toInt();
    time.substring(0,5).getBytes(time_tab, 5+1);
    minute = time.substring(3,5).toInt();
  }
}