WordPress.org

Ready to get started?Download WordPress

Forums

Google XML Sitemaps
google-xml-sitemap has wrong time in map (14 posts)

  1. wildun
    Member
    Posted 3 years ago #

    I have double checked and updated server time settings and wordpress general time settings, they are correct but the generated sitemap still shows time ahead by 5 hours. Not sure what the cause is.

  2. thewebwriter
    Member
    Posted 3 years ago #

    I'm having the same issue - have actually noticed it for several months but am just now getting around to looking into it. Can anyone tell us how to set the correct time for the generated sitemap?

  3. ishanbansal
    Member
    Posted 3 years ago #

    I have exactly the same issue.

  4. jonamerica
    Member
    Posted 3 years ago #

    I have the same issue

  5. bl202277
    Member
    Posted 3 years ago #

    You need to set the time on the server. If this is a Linux server then put in the command:
    To change the time type(as an example):
    date -s 10:10

    [sig moderated as per the Forum Rules]

  6. tizz
    Member
    Posted 3 years ago #

    I have the same issue, two hours behind.
    My hoster said the server time is correct.

  7. liquidRock
    Member
    Posted 3 years ago #

    Ditto. I have a dedicated, managed Linux server. The server time in WHM is identical to my local time. The sitemap time is 4 hours ahead. Not cool.

    Anyway to fix this?

  8. milez
    Member
    Posted 3 years ago #

    Same bug here!

    The problem is he is outputting post_date_gmt to the screen instead of post_date. I just wasted the last hour trying to find where this happens in sitemap-core.php but came up empty. If you look in your database in table wp_posts you'll see that post_date_gmt is 4 hours faster (in my case) than the post_date field. I've found this bug in other plugins too.

    Plugin author: We love your plugin but cannot use it without correct server time. Please fix!

  9. milez
    Member
    Posted 3 years ago #

    Wow just noticed 5 months and no response from the author...guess we're on our own?

  10. liquidRock
    Member
    Posted 3 years ago #

    seems like it. unless some code wizard can tell the rest of us how to edit the files to make it work right. Any takers? :)

  11. tizz
    Member
    Posted 3 years ago #

    I'm concluding that it's right in that way, probably, at least until the author doesn't tell us
    The map shows the GMT/UTC hour, which is the universal time (that's the same as Greenwich), and this explains why each of us has a different gap, depending on the time zone (for example, mine is UTC+2 now with legal time, so map tells 2 hours behind 'cause it's UTC hour)

  12. liquidRock
    Member
    Posted 3 years ago #

    yes, but there needs to be a control for users to change it for their timezone. Or it should read the server time which would be great for those of us with dedicated machines.

  13. bsvetlin
    Member
    Posted 3 years ago #

    wordpress set default timezone to UTC.
    In wp-settings.php on row 32 replace:
    date_default_timezone_set( 'UTC' ); with you current timezone Ex.:
    date_default_timezone_set('Europe/Sofia');

  14. tizz
    Member
    Posted 3 years ago #

    Well, I don't know, it's not so good change a WP file-core
    Also, every update, you must do it again...
    Is there something for wp-config, maybe?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic