From f1cbb8dc8a56632bc56b1b4d52cf0e577e704647 Mon Sep 17 00:00:00 2001 From: Pierre Date: Wed, 3 Jan 2018 12:34:38 +0100 Subject: [PATCH] Return time instead of day / month / year for countdown timer --- classes/components/posts.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/classes/components/posts.php b/classes/components/posts.php index 752972d..72265dd 100644 --- a/classes/components/posts.php +++ b/classes/components/posts.php @@ -177,10 +177,11 @@ class Posts { } //Countdown timer specific - $info["year_end"] = $src["annee_fin"]; - $info["month_end"] = $src["mois_fin"]; - $info["day_end"] = $src["jour_fin"]; - + if($src['annee_fin'] != 0) + $info["time_end"] = strtotime($src["annee_fin"]."/".$src['mois_fin']."/".$src["jour_fin"]); + else + $info["time_end"] = null; + //Weblink specific $info["link_url"] = $src["url_page"]; $info["link_title"] = $src["titre_page"];