This little combo was giving me Sunday, April 30 on my local server and Thursday, April 1 on my remote host, and I can't for the life of me figure out why. I could swear it used to work...
$today = gmmktime(0,0,0,date('m,d,Y',gmmktime()));
echo gmdate('l, F j', $today);
(The first function gives me a "midnight" time stamp, so all dates put into the db, and compared to it, are consistent).
When I rewrote it thus, it worked fine on both hosts:
$m = date('m',gmmktime());
$d = date('d',gmmktime());
$y = date('Y',gmmktime());
$today = gmmktime(0,0,0,$m,$d,$y);
Any idea what the heck is going on?