Skip to content
Advertisement

Detect BST in php

I am building a booking system in php that offers session times for people to book outdoor activities.

In the summer months, there is an extra session available at the end of the day, because of Daylight Savings, there is an extra hour in the evenings.

JavaScript

I am using this…

JavaScript

I only need to show this extra option in the select list between these dates. Is this something I will need to set manually from year to year, or is there a PHP date variable that knows the days the clocks change?

Advertisement

Answer

JavaScript

or use the DateTime object equivalent, which maintains details of all the transition dates globally

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement