Skip to content

Commit 5bc5fb6

Browse files
committed
Remove duplicate date parsing in Post_Command.php
1 parent cbe5823 commit 5bc5fb6

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎src/Post_Command.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,6 @@ public function generate( $args, $assoc_args ) {
779779

780780
// Add time if the string is a valid date without time.
781781
$date = DateTime::createFromFormat( 'Y-m-d', $post_data['post_date'] );
782-
$date = DateTime::createFromFormat( 'Y-m-d', $post_data['post_date'] );
783782
if ( $date && $date->format( 'Y-m-d' ) === $post_data['post_date'] ) {
784783
$post_data['post_date'] .= ' 00:00:00';
785784
}

0 commit comments

Comments
 (0)