Display time/date in specific timezone using date() function

后端 未结 2 417
独厮守ぢ
独厮守ぢ 2020-12-15 20:51

I use the date() function to get day, month and year.

$year = date(y);
$month  = date(m);
$day = date(d);

But my hosting is in another plac

2条回答
  •  情书的邮戳
    2020-12-15 21:47

    you could use http://www.php.net/manual/en/function.date-default-timezone-set.php to set the timezone to what you want

提交回复
热议问题