This is driving me crazy - can't figure out what's going on.
mktime() is giving me different times when run from different servers. Of course this would be normal if I were running the function empty, but here's what I'm doing:
$y = date('Y', (mktime() - 10800)); // 3 hour diff w/ server
$m = date('m', (mktime() - 10800));
$d = date('d', (mktime() - 10800));
$this->today = mktime(0,0,0,$m,$d,$y);
(the 3-hour adjust is only because the client's timezone is 3 hours off from the server's - it's done so that the entries they make flip over to the next day at midnight in their time zone, not the server's)
Anyway, $this->today should always be midnight on the day specified, since I'm feeding it zero minutes, seconds, hours and a specific day, month, year. Instead it's 4 hours later in the server's timezone (1122696000) and 7 hours later in the client's timezone (1122706800). So not only is it wrong, it appears to be deriving its hour setting from the server, rather than using the 0 I'm feeding it.
What the heck am I doing wrong? How can I get the zero hour/minute/second of the specified day as a unix timestamp?
Thanks,
Bob