MortimerJazz Posted October 16, 2006 Share Posted October 16, 2006 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 Link to comment https://forums.phpfreaks.com/topic/24088-getting-a-gmt-time-stamp-in-my-scripts/ Share on other sites More sharing options...
Daniel0 Posted October 16, 2006 Share Posted October 16, 2006 gmdate('r'); Link to comment https://forums.phpfreaks.com/topic/24088-getting-a-gmt-time-stamp-in-my-scripts/#findComment-109488 Share on other sites More sharing options...
MortimerJazz Posted October 16, 2006 Author Share Posted October 16, 2006 Thanks Daniel - so it would just be a case of replacing now() with gmdate('r');? Link to comment https://forums.phpfreaks.com/topic/24088-getting-a-gmt-time-stamp-in-my-scripts/#findComment-109499 Share on other sites More sharing options...
Daniel0 Posted October 16, 2006 Share Posted October 16, 2006 Well, PHP do not have a function called now(), but check this out: http://php.net/gmdate Link to comment https://forums.phpfreaks.com/topic/24088-getting-a-gmt-time-stamp-in-my-scripts/#findComment-109504 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.