Changed time() to current_time( ) all to fix timezone issues
The UTC offset was omitted by the WP date query, so the UTC timestamp returned by time() was compared to a local timestamp.
This commit is contained in:
parent
65eafd2524
commit
3eecaaf8fe
@ -73,7 +73,7 @@ class SCLiveticker_Widget extends WP_Widget {
|
|||||||
echo ' sclt-widget-ajax" '
|
echo ' sclt-widget-ajax" '
|
||||||
. 'data-sclt-ticker="' . esc_attr( $category ) . '" '
|
. 'data-sclt-ticker="' . esc_attr( $category ) . '" '
|
||||||
. 'data-sclt-limit="' . esc_attr( $count ) . '" '
|
. 'data-sclt-limit="' . esc_attr( $count ) . '" '
|
||||||
. 'data-sclt-last="' . esc_attr( time() );
|
. 'data-sclt-last="' . esc_attr( current_time( 'timestamp' ) );
|
||||||
}
|
}
|
||||||
echo '">';
|
echo '">';
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ class SCLiveticker {
|
|||||||
$output .= ' sclt-ticker-ajax" '
|
$output .= ' sclt-ticker-ajax" '
|
||||||
. 'data-sclt-ticker="' . $ticker . '" '
|
. 'data-sclt-ticker="' . $ticker . '" '
|
||||||
. 'data-sclt-limit="' . $limit . '" '
|
. 'data-sclt-limit="' . $limit . '" '
|
||||||
. 'data-sclt-last="' . time();
|
. 'data-sclt-last="' . current_time( 'timestamp' );
|
||||||
}
|
}
|
||||||
$output .= '">';
|
$output .= '">';
|
||||||
|
|
||||||
@ -350,13 +350,13 @@ class SCLiveticker {
|
|||||||
$res[] = array(
|
$res[] = array(
|
||||||
'w' => $slug,
|
'w' => $slug,
|
||||||
'h' => $out,
|
'h' => $out,
|
||||||
't' => time(),
|
't' => current_time( 'timestamp' ),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$res[] = array(
|
$res[] = array(
|
||||||
's' => $slug,
|
's' => $slug,
|
||||||
'h' => $out,
|
'h' => $out,
|
||||||
't' => time(),
|
't' => current_time( 'timestamp' ),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user