Orionsbelter Posted March 28, 2010 Share Posted March 28, 2010 Hi there i have been working on a website where i have used the function gmdate(); many times in my scripts however as people may know the time for London has now go forward an hour there when using the gmdate(); function now it's one hour wrong how can i correct this? Thank you very much for reading Quote Link to comment https://forums.phpfreaks.com/topic/196786-gmt-date/ Share on other sites More sharing options...
Mchl Posted March 28, 2010 Share Posted March 28, 2010 GMT is not affected by daylight savings. Quote Link to comment https://forums.phpfreaks.com/topic/196786-gmt-date/#findComment-1033043 Share on other sites More sharing options...
Orionsbelter Posted March 28, 2010 Author Share Posted March 28, 2010 What is? Please also bear in mind the sever am using is a US sever but i wish for the wbesite to record times in the UK. Quote Link to comment https://forums.phpfreaks.com/topic/196786-gmt-date/#findComment-1033046 Share on other sites More sharing options...
Mchl Posted March 28, 2010 Share Posted March 28, 2010 British Summer Time is used during daylight savings. Use date_default_timezone_set to set default timezone for your script. Quote Link to comment https://forums.phpfreaks.com/topic/196786-gmt-date/#findComment-1033050 Share on other sites More sharing options...
Orionsbelter Posted March 28, 2010 Author Share Posted March 28, 2010 when i use date_default_timezone_set('Europe/London'); it still does not work Quote Link to comment https://forums.phpfreaks.com/topic/196786-gmt-date/#findComment-1033052 Share on other sites More sharing options...
Orionsbelter Posted March 28, 2010 Author Share Posted March 28, 2010 Anyone else know how i can sort this? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/196786-gmt-date/#findComment-1033061 Share on other sites More sharing options...
salathe Posted March 28, 2010 Share Posted March 28, 2010 gmdate will only ever return dates/times in GMT... you cannot change that. The regular date function will reflect whatever timezone you set (like Europe/London above). Quote Link to comment https://forums.phpfreaks.com/topic/196786-gmt-date/#findComment-1033115 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.