I came across a situation where i want to end an event exactly after two days and before an hour of third day ( i.e. 11:00 pm on third day). After searching on google and checking the date function in php manual i came to this solution
$new_date = ( strtotime(’-1 hour’,strtotime ( ‘+3 day’ , strtotime (date ( ‘Y-m-d’ ) ) ) ));
This will return a unix timestamp which will give you 11:00 pm of third day.
eg. if todays date is 27/05/2010 07:08:15 then it will give you 29/05/2010 23:00:00
