Home » Php » How can I detect day light savings automatically in PHP?

How can I detect day light savings automatically in PHP?

Posted by: admin November 29, 2017 Leave a comment

Questions:

How can I detect day light savings automatically in PHP?

Answers:
echo date('I');

The I (capital i) is a 1/0 denoting whether or not daylight saving is currently in effect.

http://php.net/manual/en/function.date.php

hope it helps.