Jump to content

Archived

This topic is now archived and is closed to further replies.

MortimerJazz

Getting a GMT time stamp in my scripts

Recommended Posts

Hi there - thanks for taking the time to read this,

I've just written a login script in PHP that inserts the time that the user last logged in.

Up until now I've been using now() ... but that doesn't insert the time in GMT.

Having looked through PHP.net I came across date_default_timezone_set('GMT') and thought that was the answer I was looking for, but the PHP manual says this function will only work in PHP v5.1 ... and my host isn't currently running that.

So my question is, is there another way to insert a time stamp in GMT format?

Thanks for the help,

Si

Share this post


Link to post
Share on other sites
Well, PHP do not have a function called now(), but check this out: http://php.net/gmdate

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.