View Full Version : Php time

02-25-2007, 08:18 PM
Hi there,

I have a comments system, and basically when people post a comment, it shows the time they post the comment.

This is what i have...

$posted = date("jS F Y \a\\t g:ia");

It is working, but its saying the time on the server in america, which is 6 hours behind gtm time.

What do i need to edit in my code to make it so that it adds another 6 hours to what the time is, so it makes the time gtm?


02-25-2007, 08:24 PM
This should do the trick: gmdate (http://uk.php.net/function.gmdate)

02-25-2007, 08:31 PM
Ok, i changed date to gmdate and it works.

Thank you!!!