WordPress.org

Ready to get started?Download WordPress

Forums

Facebook
[resolved] Why does the plugin use "c" Instead Of "Y-m-d\TH:i:sP"? (4 posts)

  1. Aahan Krish
    Member
    Posted 2 years ago #

    Relevant File: /wp-content/plugins/facebook/fb-open-graph.php

    Code in question:

    $meta_tags['http://ogp.me/ns/article#published_time'] = get_the_date('c');
    $meta_tags['http://ogp.me/ns/article#modified_time'] = get_the_modified_date('c');

    Why does the plugin use "c" instead of something like "Y-m-d\TH:i:sP"?

    "c" outputs the right time but WRONG time zone (always UTC), if you haven't noticed it. "Y-m-d\TH:i:sP" on the other hand outputs the timestamp in the same format as "c" but with the right timezone (respecting the settings in WordPress Dashboard > Settings > General).

    Please fix this, or give an explanation with regards to your choice. Thanks!

    http://wordpress.org/extend/plugins/facebook/

  2. Matt Kelly (Facebook)
    Member
    Plugin Contributor

    Posted 2 years ago #

    Thanks for the feedback-- happy to make that change.

    We're going to open up the repo for contributions though. Do you want to make the change when that happens? :)

  3. Aahan Krish
    Member
    Posted 2 years ago #

    We're going to open up the repo for contributions though.

    That'd be great!

    Do you want to make the change when that happens? :)

    Unfortunately, I don't know how to use those version control systems (I'm learning, and it'll take a while). :( I'd be glad to help if there's any other way.

    Thanks!

  4. Aahan Krish
    Member
    Posted 2 years ago #

    @mattwkelly Before you have the changes made, I'd like to direct you to this (which sheds some light on the issue) so that you can take a proper decision.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic