edited main.c to use system time instead of RTC data