How can I determine whether the specified time is a daylight saving time? how can I determine whether the specified time is used to obtain the U.S. Daylight Saving Time? I know I can write a function to determine whether the current time is an American daylight saving time... but I can't tell you how to judge it at the specified time .... summer order system judgment function & nbsp; is_dst () {& nbsp; $ timezonedate (e); & nbsp; get the current time zone & nbsp; & whether the specified time is in the daylight saving time system
How to determine whether to use the U.S. summer order at a specified time
I know that I can write a function to determine whether it is currently in the U.S. summer order...
But I can't tell you how to judge it at the specified time ....
// Xia Ling system judgment
Function is_dst (){
$ Timezone = date ('e'); // Obtain the current time zone
Date_default_timezone_set ('US/Pacific-new'); // force the time zone
$ Dst = date ('I'); // when determining whether to renew
Date_default_timezone_set ($ timezone); // restore the time zone
Return $ dst; // return the result
}
Share:
------ Solution --------------------
Isn't the second parameter of date used to specify the time?