date au format ISO 8601 timestamp api instagram en Français
Posté : 02 nov. 2020, 14:53
Bonjour, je recherche depuis longtemps dans tous les sens et n'arrive pas à afficher la date tout simplement en Français et non au format unix iso ISO 8601. (je trouve l'inverse partout !)
Je vous remercie d'avance, Cordialement, Pierre-Yves
(voici un extrait de mon code API instagram )
echo "<div class='ig_feed_container'>";
foreach($contents["data"] as $post){
$username = isset($post["username"]) ? $post["username"] : "";
$caption = isset($post["caption"]) ? $post["caption"] : "";
$media_url = isset($post["media_url"]) ? $post["media_url"] : "";
$permalink = isset($post["permalink"]) ? $post["permalink"] : "";
$media_type = isset($post["media_type"]) ? $post["media_type"] : "";
$timestamp = isset($post["timestamp"]) ? $post["timestamp"] : "";
echo "
<div class='ig_post_container'>
<div class='ig_post_container2'>";
if($media_type=="VIDEO"){
echo "<video controls style='width:100%; display: block !important;'>
<source src='{$media_url}' type='video/mp4'>
Your browser does not support the video tag.
</video>";
}
else{
echo "<a href='{$permalink}'target='_blank'><img src='{$media_url}' /></a>";
}
echo "</div>
<div class='ig_post_details'>
<div>
<img src='//www.aupied.net/images/instagram3BC.png' alt='instagram' style='width:80px;height:22px;'></br>
<strong>@{$username}</strong>
</br>
</br>
</div>
<div>
<strong>{$caption}</strong>
</div>
<div>
{$timestamp} // <------- AFFICHE ICI UNIQUEMENT AU FORMAT ISO
</div>
</div>
</div>
";
}
echo "</div>"
?>
</div>
Je vous remercie d'avance, Cordialement, Pierre-Yves
(voici un extrait de mon code API instagram )
echo "<div class='ig_feed_container'>";
foreach($contents["data"] as $post){
$username = isset($post["username"]) ? $post["username"] : "";
$caption = isset($post["caption"]) ? $post["caption"] : "";
$media_url = isset($post["media_url"]) ? $post["media_url"] : "";
$permalink = isset($post["permalink"]) ? $post["permalink"] : "";
$media_type = isset($post["media_type"]) ? $post["media_type"] : "";
$timestamp = isset($post["timestamp"]) ? $post["timestamp"] : "";
echo "
<div class='ig_post_container'>
<div class='ig_post_container2'>";
if($media_type=="VIDEO"){
echo "<video controls style='width:100%; display: block !important;'>
<source src='{$media_url}' type='video/mp4'>
Your browser does not support the video tag.
</video>";
}
else{
echo "<a href='{$permalink}'target='_blank'><img src='{$media_url}' /></a>";
}
echo "</div>
<div class='ig_post_details'>
<div>
<img src='//www.aupied.net/images/instagram3BC.png' alt='instagram' style='width:80px;height:22px;'></br>
<strong>@{$username}</strong>
</br>
</br>
</div>
<div>
<strong>{$caption}</strong>
</div>
<div>
{$timestamp} // <------- AFFICHE ICI UNIQUEMENT AU FORMAT ISO
</div>
</div>
</div>
";
}
echo "</div>"
?>
</div>