title: Why is my time() off by one hour in php?
body: <p>I am adding the current date and time to my database using the following code:</p>
  
  <pre><code>$current_date_time = time();
  echo date('n/j/y g:ia',$current_date_time);
  </code></pre>
  
  <p>It shows up as 11/29/09 12:38am  when it should be 11/29/09 11:38am </p>
  
  <p>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?</p>
  
  <p>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?</p>