PHP Timezone problem

Posted by seaworthy on Stack Overflow See other posts from Stack Overflow or by seaworthy
Published on 2010-04-18T18:17:52Z Indexed on 2010/04/18 18:23 UTC
Read the original article Hit count: 290

Filed under:
|
|

I am in Albuquerque, NM. I am trying to update some stamps every time I put an entry into a database.

Here is what I use.

date_default_timezone_set("US/Mountain");
$stamp =mktime();
//$stamp = gmmktime();
$time = date("H:i:s",$stamp);$date = date("Y-m-d",$stamp);

My local time is 12:15 PM but what I get is 18:15PM instead.

If you can see what's going wrong please let me know.

© Stack Overflow or respective owner

Related posts about php

Related posts about timezone