Time till Midnight
Moderator: General Moderators
Time till Midnight
I am trying to set a cookie that will expire at midnight, what is the easiest was to do this?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
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