I have this date for timestamp like 1393516517
, but I need the timestamp for 60 days.
I tried this way:
( 24 * 60 * 60 ) * 60 = 5184000;
Is this the correct way to do it?
I have this date for timestamp like 1393516517
, but I need the timestamp for 60 days.
I tried this way:
( 24 * 60 * 60 ) * 60 = 5184000;
Is this the correct way to do it?
1393516517 is called a UNIX timestamp and is the number of seconds since the Unix Epoch (January 1, 1970 00:00:00 GMT). This timestamp in particular corresponds to 02/27/2014 3:55 PM GMT.
If you want to add 60 days to a UNIX timestamp, then you do indeed need to add the number of seconds 60 days equals just as you do. So 1393516517 + 5184000 = 1398700517 which is 04/28/2014 3:55 PM GMT.
Assuming you are trying to get a Unix timeatamp for a date 60 days into the future of your start date:
$date = new DateTime('@1393516517');
$date->modify('+60 days');
echo $date->format('U');