So I have a MYSQL timestampl that is generating values that are 4hours ahead of what they should be. How would i subtract 4hrs from the MySQL time stamp and display that?
Here’s my current code
$mdate = date('F j, Y, g:i a',strtotime( $bm->date_added));
//$bm->dated_added returns the times stamp//
echo $mdate;
Thanks
When supplied with a second argument,
strtotime()will perform calculations based on this date:strtotime()can perform several calculations base on modifiers like these. Examples from the manual: