0

If I set my Php timezone,should I expect Daylight Saving or not?If I don't want it to,how will I set that?

Ioannis Lalopoulos
  • 1,491
  • 1
  • 12
  • 20
Akintunde
  • 11
  • 2

1 Answers1

0

How can I detect day light savings automatically in PHP?

echo date('I', time());

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.

However if you need to know if a specific timezone WILL observe Daylight savings, someone has made a function here: How to tell if a timezone observes daylight saving at any time of the year?

Community
  • 1
  • 1
Jack Cole
  • 1,528
  • 2
  • 19
  • 41