My PHP scripts are currently an hour out due to BST being in operation (GMT+1).
Is there a way of setting php.ini's date.timezone to keep the time correct for BST/DST, without having to manually modify it when the clocks go back?
Alternatively, if PHP used the server's time, which is correct, that would work. Is there a way to tell it to do so?
Best Answer
Assuming reasonably-recent PHP, if you define date.timezone correctly via date_default_timezone_set(), PHP will handle the GMT offsets itself. Assuming, on the other hand, that you're stuck with old PHP, you'll have to do one of three things:
Of those, the clear winning solution is a PHP upgrade. How old is your version, really?