1 2 3 4 5 6 7 8 9
| date("Y-m-d"); // 2015-02-10
$now = microtime(TRUE); date("Y-m-d", $now); // 2015-02-10 date("Y-m-d", $now - 60 * 60 * 24); // 2015-02-09
mktime(hour, minute, second, month, day, year) $t = mktime(13, 2, 3, 2, 10, 2015); date("Y-m-d H:i:s", $t); // 2015-02-10 13:02:03
|