Issue #25. server time offset.
parent
c7f3a0fb09
commit
cc7f54dcb9
|
|
@ -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"])) : "";
|
$title = ($isEdition) ? htmlspecialchars(stripslashes($post["title"])) : "";
|
||||||
$body = ($isEdition) ? stripslashes($post["description"]) : "";
|
$body = ($isEdition) ? stripslashes($post["description"]) : "";
|
||||||
$url = ($isEdition) ? $post["url"] : "";
|
$url = ($isEdition) ? $post["url"] : "";
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function transform_offset($offset){
|
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() {
|
function getLangs() {
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
if ($tumble->contarRegistros()>0) {
|
if ($tumble->contarRegistros()>0) {
|
||||||
$fecha = null;
|
$fecha = null;
|
||||||
while($register = mysql_fetch_array($rs)) {
|
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; }
|
if ( $fecha != null && $formatedDate == $fecha ) { $formatedDate = ""; } else { $fecha = $formatedDate; }
|
||||||
$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
|
$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue