03-30-2010, 02:50 PM
I have a sunrise sunset times on my website using the code below. However now we have gone into daylight saving the times are 1 hour out. Is there a way that the php can change the time to +1 automatically?
Thanks in advance
03-30-2010, 03:00 PM
Have you tried using date_default_timezone_set?
It looks like your script is only tollerant with a single timezone, so that function may be appropriate for you.
03-30-2010, 03:06 PM
Thankyou for the quick reply. I tried using the code below.
However it seems to be saying that the sun should rise at 9:00 and set at 17:00. Which is defiantly wrong. What have I done wrong with the code?
03-30-2010, 03:15 PM
Ah. Well I intended to use the code on a separate line, above your example. Although I must be honest I am completely unfamiliar with the sun related functions. If you are just trying to differentiate between BST and UTC, you just need to use that timezone function.
03-30-2010, 03:20 PM