把UTC/GMT(伦敦)时间字符串转成中国时间
四月 29th, 2008 by xLight
今天第一次知道UTC时间竟然还有夏令时,这不是添乱嘛。
原来写的代码转换时区时都是用timestamp +3600*8 。。
function conventDateTime_UTCtoChina($strDatetime){
date_default_timezone_set(’Europe/London’);
$t = strtotime($strDateTime);
date_default_timezone_set(’Asia/Shanghai’);
return date(’Y-m-d H:i:s’,$t );
}


