WordPress.org

Ready to get started?Download WordPress

Forums

timezone and rss feed problem (12 posts)

  1. smoody
    Member
    Posted 9 years ago #

    Hello,

    I am having a timezone problem (WP1.5). I set the 'Times in the weblog should differ by:' field to differ from the UTC time by -5 hours (I'm on the east coast, USA). Everything looks fine when looking at the blog timestamp. However, when my RSS reader/subscription services (both Bloglines and NewsGator outlook plugin) reads my feed, it subtracts five hours off the pubdate of each entry.

    I believe it does this because the rss feeds do not include a time offset (always listed as +0000 no matter what I've provided as the offset in WordPress). Am I wrong? Am I missing something?

    Thank you in advance, Scott

  2. smoody
    Member
    Posted 9 years ago #

    After further inspection, it seems that the RSS feed pubtime for posts is output in *local time* as determined by the time offset in the options page used by WP1.5 instead of the UTC. Shouldn't the UTC always be used for the RSS feed?
    Here is what I do: two posts, one with an offset of -5, one with no offset. then i look at the RSS feed. the two pub times are different by 5 hours. It seems to me they should stay the same since there is no hint of a time zone in the RSS feed. Am I the only one having this problem?

  3. colinj
    Member
    Posted 9 years ago #

    I'm seeing exactly the same behavior.

    In my case I get an incorrect time on the blog but the correct posting time in the RSS feed.

  4. absinthe
    Member
    Posted 9 years ago #

    Confirmed -- the RSS feed uses local time, but affixes +0000 as the time zone. D'oh!

  5. indi
    Member
    Posted 9 years ago #

    I get the wrong time for RSS Comments as well (wp-commentsrss2.php). It screws up all the International blogs in my feedreader. Is there a fix for this?

  6. dinocho
    Member
    Posted 9 years ago #

    Well... I got the same problem.
    My system time is in CST(GMT +0800),my blog settings is also setted to +8, but I still get wrong time in pubDate field. Just the time minus the GMT_Offset.

  7. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Known bug. Will be fixed in 1.5.1.

  8. jeffsharman
    Member
    Posted 9 years ago #

    Does anyone have a hack to fix this in the meantime?

  9. chedong
    Member
    Posted 8 years ago #

    RSS time zone issue: GMT time + GMT time zone or local time + local time zone

    I subscribe some feed published by wordpress: I found the timezone problem. the post always shown published tomorrow.

    current wordpress default pubDate field is localtime + GMT timezone:
    <pubDate>Wed, 25 May 2005 09:32:44 +0000</pubDate>
    but feed publish in China: it should be
    <pubDate>Wed, 25 May 2005 09:32:44 +0800</pubDate>
    or convert time to GMT and +0000
    <pubDate>Wed, 25 May 2005 01:32:44 +0000</pubDate>

    Thanks

    Che Dong

  10. fpatten
    Member
    Posted 8 years ago #

    I'm running 1.5.1.3 and still having the same problem. Is there a fix I can't find? In which file was the fix implemented? Then I could just re-install that one file.

    <pubDate>Mon, 11 Jul 2005 02:40:48 +0000</pubDate>
    <dc:creator>Frank Patten</dc:creator>
    <category>PodCast</category>
    <guid>
    http://www.frankpatten.ca/blog/2005/07/10/episode-01/
    </guid>

    should be <pubDate>Sun, 10 Jul 2005 09:40:48 -0500</pubDate>

  11. rustin
    Member
    Posted 8 years ago #

    Same problem here. There is lots of threads on the topic, but none that I can see come to a resolution on the problem.

  12. sirtwist
    Member
    Posted 8 years ago #

    In wp-rss2.php, modify the <pubDate> line for each post (the second occurance of <pubDate></pubDate>) so that you replace:

    get_the_time('Y-m-d H:i:s')

    with

    get_post_time('Y-m-d H:i:s',true)

    This will return GMT time with the appropriate time zone settings.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags