I wanted to re-format mysql DateTime data type from 2011-12-08 08:31:23 to Dec 8, 2011 8:31 am while displaying on browser using PHP5 so I used
$create_date=date("M j, Y g:i a", strtotime($f["create_date"]));
and it is live on godaddy server but it is showing morning entries to pm and evening entries to to am..?
The time difference between Arizona and Pakistan is 12 hours.
strtotimeuses godaddy’s server time when converting to a Unix timestamp.Use date_default_timezone_set() to set your time zone.