ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Default feed template error, and gmt_entry_date bug?

February 17, 2009 6:24am

Subscribe [6]
  • #1 / Feb 17, 2009 6:24am

    Paul Stone

    97 posts

    Hi,

    I thought I’d post this here rather than the bug forum, as it may just be (cough) user error!

    Firstly, what I think may be an error in the default feed templates:  In the code given here (http://expressionengine.com/templates/source/category/feeds/), in the GUID node there is use made of the

    {gmt_entry_date format="%H:%i:%sZ"}

    tag.  Now, should the ‘Z’ in the format bit be there, or should it be %Z (for server offset from UTC)?

    Secondly, this is what I think may be a bug: having the seconds (%s) in there made my RSS feed republish every time one of the entries was updated because instead of putting the seconds in from when the entry was published, it was including the seconds from when the entry was updated.

    Thanks for any insights,
    Paul.

    PS: I realise that in a way the RSS feed should let feed readers know that the feed has been updated, but because I allow people to sign up to the feedburner ‘feed by email’ service I didn’t want them to be getting the same stories sent to them every time they were event slightly edited.

    UPDATE after topic closed: I fixed my template by doing something similar to what’s described on this v. detailed post: http://23rdworld.com/2009/12/23/how-to-fix-your-expressionengine-rss-template/

  • #2 / Feb 17, 2009 12:37pm

    Sue Crocker

    26054 posts

    Hi, Paul. Not certain of the answer, I rarely use Atom. Escalating to dev team for clarification.

  • #3 / Feb 18, 2009 12:20pm

    Sue Crocker

    26054 posts

    Paul, the entry date doesn’t change unless you update it when you edit. Your feed is refreshing because the RSS module uses the weblog’s most recent edit date for the server headers to tell feed readers whether anything has changed or not.

    The template date stamps are correct, Z is the special UTC designator which tells it that the date is already in UTC time - no offset.

  • #4 / Dec 23, 2009 9:40pm

    mahalie

    60 posts

    This confused me at first too. When using <dc:date> the format must be a W3CDTF date. An example of a valid W3CDTF Date: 2002-10-02T10:00:00-05:00 (So the T belongs and was not meant to be ‘%T’).

    The Z in this case is a suffix which, when applied to a time, denotes a UTC offset of 00:00 and is actually meant to be part of the timestamp and was not meant to be ‘%Z’.

    See http://www.w3.org/TR/NOTE-datetime for more info. (It covers the T and Z).

  • #5 / Dec 27, 2009 1:59pm

    Greg Salt

    3988 posts

    Hi Paul,

    Did Sue and mahalie (thanks for the assist) answer your question?

    Cheers

    Greg

  • #6 / May 09, 2010 11:58pm

    Marc Debiak

    36 posts

    I just wrestled with this one for a while.

    It turns out, the date feed won’t validate if you’re pulling in from multiple weblogs.  You need to specify limit=“1” in the first occurrence of <dc:date>.

    This fix worked for me:

    <dc:date>{exp:weblog:entries limit="1" weblog=“{master_weblog_name}"}{gmt_date format="%Y-%m-%dT%H:%i:%s%Q"}{/exp:weblog:entries}</dc:date>
  • #7 / May 10, 2010 2:09am

    John Henry Donovan

    12339 posts

    papertigerllc,

    thanks for the extra info. Closing this one out as its an older thread. If you have any further questions feel free to start a new thread.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases