Skip to content

Commit

Permalink
Merge pull request #10859 from AminulBD/trunk
Browse files Browse the repository at this point in the history
Publish and modify date time should not be localized
  • Loading branch information
xyfi committed Sep 6, 2018
2 parents 8b1d8e1 + 79d51ee commit 9d7043d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/class-opengraph.php
Expand Up @@ -723,10 +723,12 @@ public function publish_date() {
}
}

$pub = get_the_date( DATE_W3C );
$post = get_post();

$pub = mysql2date( DATE_W3C, $post->post_date, false );
$this->og_tag( 'article:published_time', $pub );

$mod = get_the_modified_date( DATE_W3C );
$mod = mysql2date( DATE_W3C, $post->post_modified, false );
if ( $mod !== $pub ) {
$this->og_tag( 'article:modified_time', $mod );
$this->og_tag( 'og:updated_time', $mod );
Expand Down

0 comments on commit 9d7043d

Please sign in to comment.