• Resolved satheeshrajv

    (@satheeshrajv)


    Hi,

    I’m using Google news sitemap. In that I’m always seeing the Timezone as GMT +0:00. My default timezone is IST in wordpress but why the news sitemap has +0:00 GMT time. Will the google resolve it properly?

    • This topic was modified 5 years, 7 months ago by satheeshrajv.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is because Google wants universal time. It will translate this correctly to each news search visitor’s local time, which may not necessarily be your local time zone.

    Thread Starter satheeshrajv

    (@satheeshrajv)

    What I need to do if I want it in GMT+5:30. I have checked well known sites. They are having proper timezone. So please suggest me a way to achieve it.

    • This reply was modified 5 years, 7 months ago by satheeshrajv.
    • This reply was modified 5 years, 7 months ago by satheeshrajv.
    Thread Starter satheeshrajv

    (@satheeshrajv)

    I’m using the below code in feed-sitemap-news.php to achieve my requirement. Is it fine?

    $td_article_date_unix = get_the_time(‘U’, $post->ID);
    echo date_i18n(DATE_W3C, $td_article_date_unix);

    Looking at your news sitemap source, the publication date is still being output with +00:00 as TZD value so it appears to not be working correctly. If the dates/times themselves are in your local time, then Google will convert them incorrectly because it will assume the stamps are in GMT.

    You could try using date(DATE_W3C, $td_article_date_unix); because there really is no need for parsing that format but it might be just the same result. It also depends on your PHP version how that constant is defined.

    Why do you need it to be in your local timezone? Converted to GMT is just fine for Google. It should not have any problems with that…

    By the way, please make sure that your correct timezone is selected on Settings > General if you insist on using local time.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Timezone in Sitemap’ is closed to new replies.