How to get reliable yesterdays date?

Note that the constant SECS_PER_DAY is already defined for you in the Time library.