I use gmt_to_local to calculate the current time:
$currentTime = gmt_to_local(now(), $timezone, $daylight_saving);
The $daylight_saving value is a boolean set within my config file to decide if timezone calculations should be converted adjusting for DST.
The problem I have is that my server automatically updates its time when we move from GMT to BST or BST to GMT, so my current time value becomes incorrect. The fix is to change the $daylight_saving value to be TRUE/FALSE accordingly.
How can I avoid manually altering my config setting when my server time adjusts?
Regards, Ben.
This will return 1 or 0 based on whether or not the date is in daylight saving time. More info:
http://php.net/manual/en/function.date.php