rorobobo Posted March 18, 2007 Share Posted March 18, 2007 How can I set the timezone so that the correct time appears on my site? The code I currently have is: echo date("F jS, Y, g:ia"); As far as I can tell the code above is taking the timezone from the server I am on which is MST. I want to set it to GMT which is 7 hours ahead of MST. Any help would be much appreciated. Cheers. Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted March 18, 2007 Share Posted March 18, 2007 $time = strtotime("now"); $time = $time + 3600;//this is in intervals of 3600, either + or - according to your host's current time. $time = date("F jS, Y, g:ia", $time); echo $time; Ted Quote Link to comment Share on other sites More sharing options...
interpim Posted March 18, 2007 Share Posted March 18, 2007 $mytime=date()+25200; echo $mytime; Quote Link to comment Share on other sites More sharing options...
rorobobo Posted March 18, 2007 Author Share Posted March 18, 2007 Thank you so much guys. That worked a treat. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.