problem in acm_get_next_cron_execution()
-
function acm_get_next_cron_execution($timestamp) {
if ($timestamp – time() <= 0)
return __(‘At next page refresh’, ‘acm’);return __(‘In’, ‘acm’).’ ‘.human_time_diff( current_time(‘timestamp’), $timestamp ).’
‘.date(“d.m.Y H:i:s”, $timestamp);}
change time() for current_time(‘timestamp’)
the correct code is:
function acm_get_next_cron_execution($timestamp) {
if (($timestamp – current_time(‘timestamp’)) <= 0)
return __(‘At next page refresh’, ‘acm’);return __(‘In’, ‘acm’).’ ‘.human_time_diff( current_time(‘timestamp’), $timestamp ).’
‘.date(“d.m.Y H:i:s”, $timestamp);}
time() is UTC and the parameter $timestamp is not UTC
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘problem in acm_get_next_cron_execution()’ is closed to new replies.