diff --git a/src/Post_Command.php b/src/Post_Command.php index 8bf5250c..3ef1f996 100644 --- a/src/Post_Command.php +++ b/src/Post_Command.php @@ -779,7 +779,6 @@ public function generate( $args, $assoc_args ) { // Add time if the string is a valid date without time. $date = DateTime::createFromFormat( 'Y-m-d', $post_data['post_date'] ); - $date = DateTime::createFromFormat( 'Y-m-d', $post_data['post_date'] ); if ( $date && $date->format( 'Y-m-d' ) === $post_data['post_date'] ) { $post_data['post_date'] .= ' 00:00:00'; }