Commit 0b4a9b3f authored by Erick Hitter's avatar Erick Hitter
Browse files

Don't localize timestamps that are in UTC

Currently, a UTC date will be displayed with a localized timezone, which is rather misleading.

Fixes #138
parent 77c2e840
...@@ -62,7 +62,7 @@ class Orchestrate_Runner extends \WP_CLI_Command { ...@@ -62,7 +62,7 @@ class Orchestrate_Runner extends \WP_CLI_Command {
$now = time(); $now = time();
if ( $timestamp > $now ) { if ( $timestamp > $now ) {
\WP_CLI::error( sprintf( __( 'Given timestamp is for %1$s GMT, %2$s from now. The event\'s existence was not confirmed, and no attempt was made to execute it.', 'automattic-cron-control' ), date_i18n( TIME_FORMAT, $timestamp ), human_time_diff( $now, $timestamp ) ) ); \WP_CLI::error( sprintf( __( 'Given timestamp is for %1$s GMT, %2$s from now. The event\'s existence was not confirmed, and no attempt was made to execute it.', 'automattic-cron-control' ), date( TIME_FORMAT, $timestamp ), human_time_diff( $now, $timestamp ) ) );
} }
// Prepare environment // Prepare environment
......
...@@ -24,7 +24,7 @@ class Orchestrate extends \WP_CLI_Command { ...@@ -24,7 +24,7 @@ class Orchestrate extends \WP_CLI_Command {
break; break;
default : default :
$status = sprintf( __( 'Automatic execution is disabled until %s', 'automattic-cron-control' ), date_i18n( 'Y-m-d H:i:s T', $status ) ); $status = sprintf( __( 'Automatic execution is disabled until %s', 'automattic-cron-control' ), date( 'Y-m-d H:i:s T', $status ) );
break; break;
} }
...@@ -67,7 +67,7 @@ class Orchestrate extends \WP_CLI_Command { ...@@ -67,7 +67,7 @@ class Orchestrate extends \WP_CLI_Command {
$updated = \Automattic\WP\Cron_Control\Events::instance()->update_run_status( $disable_ts ); $updated = \Automattic\WP\Cron_Control\Events::instance()->update_run_status( $disable_ts );
if ( $updated ) { if ( $updated ) {
\WP_CLI::success( sprintf( __( 'Disabled until %s', 'automattic-cron-control' ), date_i18n( 'Y-m-d H:i:s T', $disable_ts ) ) ); \WP_CLI::success( sprintf( __( 'Disabled until %s', 'automattic-cron-control' ), date( 'Y-m-d H:i:s T', $disable_ts ) ) );
return; 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