why your plugin is generating wrong time zone in sitemap

#837043
  • Resolved Alok Tiwari
    Rank Math free

    Hello There,
    Can you explain why your plugin is generating wrong time zone in sitemap
    Check this url
    https://stocktoday.in/sitemap_index.xml

    I am using your plugin on same and this is showing me entry like this
    2024-07-11 08:58 +00:00
    It Should be like this
    2024-07-11 08:58 +05:30
    (aka Time Zone should be India Standard Time )

    If you see the result of rich results
    https://search.google.com/test/rich-results/result/r%2Farticles?id=r46Lf7F8_bXok3YGi2Ex_w

    Theme is already generating right time zone aka Indian Standard Time Check Date published and Date updated entries of schema

    clearly Your plugin don’t have setting to properly set time zone or Your code don’t recognize time zone from schema or even wordpress itself.

    BTW overall good plugin. It solves many things but create another set of adventures. Your reply is awaited.

    Cheers
    Alok Tiwari

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    I apologize for the inconvenience you are facing with the time zone in the sitemap generated by our plugin. Thank you for providing the URLs for reference.

    To address the time zone issue in the sitemap, you can follow these steps:

    1. Check Sitemap Time Zone: Ensure that the time zone settings in your WordPress site are correctly configured to reflect the Indian Standard Time (IST) as expected.

    2. Plugin Configuration: Verify if there are any specific settings related to time zone configuration within Rank Math. Unfortunately, Rank Math does not have a specific setting to adjust the time zone in the sitemap directly.

    3. Schema Markup: Confirm that the schema markup for datePublished and dateModified in your content reflects the correct time zone. You can use tools like the Rich Results Test to validate this information.

    If after checking these points, the issue persists, please consider reaching out to our dedicated support team by clicking here. They are available 24/7 and will assist you further in resolving this matter.

    Thank you for your understanding, and we appreciate your feedback on using our plugin.

    Best regards.

    Sources:
    How to Change the Date & Time on Your Posts/Pages » Rank Math
    Resolving Rank Math Schema Markup Related Issues
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    Hello,

    Please note that this is the default behavior of the plugin and there is no option to do that.

    To achieve that, you must make changes directly to this plugin file:
    wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-timezone.php file.

    Then change the UTC with your preferred timezone on line 40.

    Since you want +5:30, the code should be like this:

    $date_time = new DateTime( $datetime_string, new DateTimeZone( '+5:30' ) );
    

    Lastly, these changes will be overridden by each update and you will have to make the changes again in the plugin files.

    Looking forward to helping you.

    Thanks for quick fix.. After regeneration it worked smoothly. My Suggestion do fetch time zone while installing. So users don’t need to manually edit that file. Forward this message to your developer(s..).

    I am still checking… Lets see..

    Hello,

    We are glad to know that this issue has been resolved. Thank you for letting us know.

    This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.

    We appreciate your patience and cooperation throughout this process.

    Thank you for choosing Rank Math.

Viewing 4 replies - 1 through 4 (of 4 total)

The ticket ‘why your plugin is generating wrong time zone in sitemap’ is closed to new replies.