How to get reliable yesterdays date?

pcborges:
Hi, thank you all.

I am using
#include <DS3231.h>
That is the library for the hardware RTC I am using and I am having a hard time finding how to sincronize in a way I can have access to the function now().

Thanks
Paulo

You call the setSyncProvider() function with the identity of the get method, in setup():

setSyncProvider(RTC.get);   // the function to get the time from the RTC

Change RTC.get to the name of the method appropriate to your type of RTC.