How to get reliable yesterdays date?

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