Facebook 'scheduled_publish_time' => UNIX TIMESTAMP(


Facebook 'scheduled_publish_time' => UNIX TIMESTAMP (TimeZone Issue)

如何处理UNIX时间戳的时区问题?我设置了我的

服务器时区 +8/SGT

时间在16:22:54

日期在2013年10月15

当我查看脸书时,我得到这个

Wednesday, 16 October 2013 at 07:22 GMT+8

我用来创建 unix 时间戳的代码

$unixTimeStamp = strtotime($retrievedScheduled);

我需要减去 1 天 15 小时才能正确发布......这里有些不对劲。我的服务器时间正确为 +8

date_default_timezone_set("Asia/Singapore"); 
$combinedDT = date('Y-m-d H:i:s', strtotime("$date $time"));

固定

我的日期和时间来自 2 个不同的变量

时间在 16:22:54

日期 2013-10-15