PHP get daylight saving time

$dst = date("I"); //I (capital i); 0 or 1 if daylight saving time
 
// example:
$hour = 14;
if(date("I")===1){
 $hour = $hour + 1;
}
// OR
$hour = 14 + date("I");
This entry was posted in PHP and tagged . Bookmark the permalink.


Comments are closed.

1,269 views