Home  >  Article  >  Backend Development  >  如何用date('c')格式获取东京时间

如何用date('c')格式获取东京时间

WBOY
WBOYOriginal
2016-06-13 13:10:331574browse

怎么用date('c')格式获取东京时间?
现在服务器的时区是北京时区+08:00 请问怎么用date('c')2012-09-11T17:00:00+09:00格式获取东京时间+09:00?

------解决方案--------------------
date_default_timezone_set('Asia/Tokyo'); 
echo date('c'); //2012-10-04T17:16:38+09:00

PHP: 所支持的时区列表

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn