How can I detect day light savings automatically in PHP?

前端 未结 1 748
[愿得一人]
[愿得一人] 2020-12-14 07:01

How can I detect day light savings automatically in PHP?

1条回答
  •  醉梦人生
    2020-12-14 08:00

    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.

    0 讨论(0)
提交回复
热议问题