FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


gmmktime() and gmdate() Differences





Magicman
Here is the code I have:
Code:
<?php
echo gmdate("l, F jS, Y   h:i:s a T");
$date = gmmktime();
echo "<br>";
echo date("l, F jS, Y  h:i:s a T", $date)
?>

I would expect gmdate() and date() using the timestamp gmmktime() would give me the same output but this is what I get:
Quote:
Wednesday, November 8th, 2006 02:09:51 am GMT
Tuesday, November 7th, 2006 02:09:51 pm CST

Am I doing something wrong here?
tony
gmdate() must return UTC time where date() returns local time.
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.