Using the system's time zone settings in PHP

后端 未结 2 962
既然无缘
既然无缘 2021-01-20 23:26

So I have a web app written in PHP that will run on different Ubuntu servers around the world. Some of the servers will be configured to run on local time, some will run on UTC,

2条回答
  •  别那么骄傲
    2021-01-21 00:06

    If you have timezone set you could use: http://php.net/manual/en/function.date-default-timezone-get.php

    Or http://php.net/manual/en/function.timezone-name-from-abbr.php

提交回复
热议问题