【发布时间】:2012-01-19 23:41:39
【问题描述】:
我知道有人问过这个问题,但我认为我的问题有点不同.. 我从 WCF JSON Web 服务获得响应..
$reservation->ChIn=substr($reservation->ChIn,6,-10);
这会提取时间戳,但会浪费 +0300 时区信息。
然后拨打$chi=getdate($reservation->ChIn);
但是,这可能有问题,因为即使我在页面中设置时区,getdate 是否知道它?因为服务器知道时区是 +02 还是 03,因为夏令时。
另一种解决方案是将 offset * 60 * 60 添加到时间戳。
【问题讨论】:
-
这个答案有帮助吗? stackoverflow.com/a/8789182/212940