I’m using the date function to be displayed for each of my new posts in a CMS.
However, I do not know how to change that value according to my timezone, which is UTC−06:00.
This is how I’m doing it:
$p['time'] = date("F j, Y, h:i a");
$time = $p['time'];
And this is how it looks:
August 24, 2011, 4:39 pm
Right now if the current time is 10:39 AM, the $time reported should be 4:39PM. I need to get rid of those extra 6 hours somehow.
You could try calling
date_default_timezone_setbefore all your time handling.Timezones reference