php_nub_qq Posted May 2, 2013 Share Posted May 2, 2013 (edited) Hello. I am having this issue where my server clock is wrong and I just can;t fix it. My timezone is GMT+2 and it is currently 14:05 ( Or 2 pm ). Right so I set my timezone to GMT date_default_timezone_set('GMT'); and it gives me this 2013-05-02 11:05:17 I assume this could be due to the daylight saving time but what can I do, I can't just go around adding and subtracting hours. Any help? Edited May 2, 2013 by php_nub_qq Quote Link to comment Share on other sites More sharing options...
Phear46 Posted May 2, 2013 Share Posted May 2, 2013 have you checked around on the net to see what gmt currently is? i suspect your problem is daylight savings as you say. you might just have to write bit of code to enable/disable daylight savings? Quote Link to comment Share on other sites More sharing options...
DaveyK Posted May 2, 2013 Share Posted May 2, 2013 I am just guessing, but what does this do: date_default_timezone_set('Europe/London'); Also, on http://wwp.greenwichmeantime.com/info/current-time/ I found that the UK is on GMT in the winter but on BST in the summer. Quote Link to comment Share on other sites More sharing options...
php_nub_qq Posted May 2, 2013 Author Share Posted May 2, 2013 (edited) oh snap... Apparently my timezone is now GMT+3 ... This explains a lot. And is going to be an easy fix to my problem because I get the user's timezone and convert it into GMT + X. Now after the timezone has changed to +3 ( in my case ) this is no longer a problem. Thank you ! Edited May 2, 2013 by php_nub_qq 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.