diff --git a/admin/index.php b/admin/index.php index c222437..faf5544 100644 --- a/admin/index.php +++ b/admin/index.php @@ -236,7 +236,7 @@ if ($user->isAdmin()) { } - $date = ($isEdition) ? strtotime($post["date"]) : time(); + $date = ($isEdition) ? strtotime($post["date"]) : gmmktime(); $title = ($isEdition) ? htmlspecialchars(stripslashes($post["title"])) : ""; $body = ($isEdition) ? stripslashes($post["description"]) : ""; $url = ($isEdition) ? $post["url"] : ""; diff --git a/classes/functions.php b/classes/functions.php index 0984b96..9d2dfaa 100644 --- a/classes/functions.php +++ b/classes/functions.php @@ -279,7 +279,16 @@ } function transform_offset($offset){ - + $sp = strpos($offset , ".")? explode("." , $offset) : false; + if(is_array($sp)){ + $minutes = strval($sp[1]); + $off_h = $sp[0]*3600; + $off_m = (($minutes*60)/100)*60; + $off = $off_h+$off_m; + } else { + $off = ($offset*3600); + } + return $off; } function getLangs() { diff --git a/index.php b/index.php index 0b45f41..cc9bc1e 100644 --- a/index.php +++ b/index.php @@ -97,7 +97,7 @@ if ($tumble->contarRegistros()>0) { $fecha = null; while($register = mysql_fetch_array($rs)) { - $formatedDate = date("M d", strtotime($register["date"])); + $formatedDate = date("M d", strtotime($register["date"])+transform_offset($conf->offset_time)); if ( $fecha != null && $formatedDate == $fecha ) { $formatedDate = ""; } else { $fecha = $formatedDate; } $permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";