📜  太平洋夏令时区php代码示例

📅  最后修改于: 2022-03-11 14:54:22.050000             🧑  作者: Mango

代码示例1
date_default_timezone_set('America/Los_Angeles'); // or wherever you are

$time = time();

if ($time >= strtotime("Second Sunday March 0")  && $time < strtotime("First Sunday November 0")) 
{

    echo date('m/d/y h:i a', $time);

} else {

    echo date('m/d/y h:i a', $time);

}