Commit 7928aaee authored by Erick Hitter's avatar Erick Hitter Committed by GitHub
Browse files

Merge pull request #141 from Automattic/fix/137-human-time-diff

Include human-friendly indication of how long automatic execution is disabled
parents bdaa2da9 afb00c5d
......@@ -24,7 +24,7 @@ class Orchestrate extends \WP_CLI_Command {
break;
default :
$status = sprintf( __( 'Automatic execution is disabled until %s UTC', 'automattic-cron-control' ), date_i18n( TIME_FORMAT, $status ) );
$status = sprintf( __( 'Automatic execution is disabled for %1$s (until %2$s UTC)', 'automattic-cron-control' ), human_time_diff( $status ), date_i18n( TIME_FORMAT, $status ) );
break;
}
......@@ -67,7 +67,7 @@ class Orchestrate extends \WP_CLI_Command {
$updated = \Automattic\WP\Cron_Control\Events::instance()->update_run_status( $disable_ts );
if ( $updated ) {
\WP_CLI::success( sprintf( __( 'Disabled until %s UTC', 'automattic-cron-control' ), date_i18n( TIME_FORMAT, $disable_ts ) ) );
\WP_CLI::success( sprintf( __( 'Disabled for %1$s (until %2$s UTC)', 'automattic-cron-control' ), human_time_diff( $disable_ts ), date_i18n( TIME_FORMAT, $disable_ts ) ) );
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment