我正在创建一个可以查看签到的应用程序,我实现了显示一些数据,但我无法显示日期,我阅读了 API 文档,发现以下内容:
id: "5107ed69704379518de3cb5f"
createdAt: 1359474025
type: "checkin"
timeZoneOffset: -420
user: {
id: "46466115"
firstName: "Abraham"
lastName: "Gonzalez"
gender: "male"
relationship: "self"
photo: {
prefix: "https://irs3.4sqi.net/img/user/"
suffix: "/JB543SD4TURRQR2A.jpg"
}
我尝试实现它,但它显示了一串数字,我想知道如何解释这些数字,我做了一些研究,发现数字是秒(http://www.epochconverter.com/),但我不知道如何解释它们:(
这是我的php代码:
$check_ins =json_decode(file_get_contents("https://api.foursquare.com/v2/users/self/checkins?oauth_token={$_SESSION['access_token']}"));
foreach($check_ins->response->checkins->items as $check_in):
echo"
<b>Lugar</b>: ".$check_in->venue->name."
<br><b>Pais</b>: ".$check_in->venue->location->country."
<br><b>Ciudad</b>: ".$check_in->venue->location->city."
<br><b>Estado</b>: ".$check_in->venue->location->state."
<b><br>Dirección</b>: ".$check_in->venue->location->address."
**<b><br>Dirección</b>: ".$check_in->createdAt."**
<br><br>";
endforeach;
所以,我的问题是:如何显示日期/或如何解释foursquare给我的数字?