Time till Midnight
Posted: Mon Jan 22, 2007 1:34 pm
I am trying to set a cookie that will expire at midnight, what is the easiest was to do this?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
[feyd@home]>php -r "$t = strtotime('tomorrow'); $s = date('Y-m-d 00:00:00', $t); $t = strtotime($s); echo date('Y-m-d H:i:s', $t); echo PHP_EOL, $t - time();"
2007-01-23 00:00:00
35980