Using RTC instead of millis to execute something every second

I initialized

unsigned long StarSec = 0;
int EndSec = now.second();

WHERE did you put that code? You can't call now.second() outside of a function.