structure7 / hvacMonitor

Monitoring supply/return air temps, run status, and on/off durations.
MIT License
10 stars 6 forks source link

Even simpler/shorter time/date formatter #148

Open structure7 opened 7 years ago

structure7 commented 7 years ago
char currentTime[9];
char currentDate[11];

void clockDisplay() {
sprintf(currentTime, "%02d:%02d:%02d", hour(), minute(), second());
sprintf(currentDate, "%02d/%02d/%04d", month(), day(), year());
Blynk.virtualWrite(V12, currentTime);  // Send time to Display Widget
Blynk.virtualWrite(V13, currentDate);  // Send date to Display Widget
}