php Method to convert Beijing time to UTC: First create a PHP sample file; then pass "$time = timestamp-8*60*60;$startUtc = date('c',$time);" The statement can be used to convert Beijing time to UTC time.
#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.
php Beijing time to UTC time
The code is as follows:
$time = 时间戳-8*60*60; $startUtc = date('c',$time );
[Recommended: PHP video tutorial]
The above is the detailed content of How to convert Beijing time to UTC in php. For more information, please follow other related articles on the PHP Chinese website!