in reply to Re: Getting yesterday's date, and random dates in the pastin thread Getting yesterday's date, and random dates in the past
You have to use timegm_nocheck, not timegm. The latter can handle month -1, for example.