Both of these options are pretty terrible - if you try to get the current date at midnight as a formatted string, it is as simple as:
date('Y-m-d') . ' 00:00:00';
Or, if you want to be a little more explicit,
date('Y-m-d H:i:s', strtotime('today midnight'));
mktime. , , , , / / . " ", , , , , , .
, mktime, . , PHP 5.3 , DateTime DateTimeZone. PHP:
php > $utc = new DateTimeZone('UTC');
php > $pdt = new DateTimeZone('America/Los_Angeles');
php > $midnight_utc = new DateTime('today midnight', $utc);
php > $midnight_utc->setTimeZone($pdt);
php > echo $midnight_utc->format('Y-m-d H:i:s');
2011-04-08 17:00:00
( 9- UTC, - PDT.)