How do I find the unix timestamp for the start of the next day in php?
Posted
by zeckdude
on Stack Overflow
See other posts from Stack Overflow
or by zeckdude
Published on 2010-03-26T00:22:13Z
Indexed on
2010/03/26
0:33 UTC
Read the original article
Hit count: 373
php
|unix-timestamp
I have a unix timestamp for the current time. I want to get the unix timestamp for the start of the next day.
$current_timestamp = time();
$allowable_start_date = strtotime('+1 day', $current_timestamp);
As I am doing it now, I am simply adding 1 whole entire day to the unix timestamp, when instead I would like to figure out how many seconds are left in this current day, and only add that many seconds in order to get the unix timestamp for the very first minute of the next day.
What is the best way to go about this?
© Stack Overflow or respective owner