I am adding the current date and time to my database using the following code:
$current_date_time = time();
echo date('n/j/y g:ia',$current_date_time);
It shows up as 11/29/09 12:38am when it should be 11/29/09 11:38am
The time is ahead by one hour. I am in the Pacific time zone and my hosting provider is in Utah, the Mountain Time Zone. Could this be the reason why it is ahead by one hour?
How do I solve this problem? Do I need to remove an hour from the time? If so, how do I do that? Or is there some sort of other way to account for time zone differences so it shows up in Pacific Time Zone time?