We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

gmt_date in my RSS Feed is showing the wrong date

How Do I?

igoldsmith's avatar
igoldsmith
15 posts
8 years ago
igoldsmith's avatar igoldsmith

I have an RSS feed at https://akana.com/news/feed it’s built by this template:

{preload_replace:master_channel_name="company"}
{exp:rss:feed channel="{master_channel_name}"}

<?xml version="1.0" encoding="{encoding}"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>Akana, Inc - News and Events</title>
    <link>http://www.akana.com/news</link>
    <description>Akana, Inc published news and events.</description>
    <dc:language>{channel_language}</dc:language>
    <dc:creator>[email protected]</dc:creator>
    <dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
    <dc:date>{gmt_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
    
{exp:channel:entries channel="{master_channel_name}" category="5|7" limit="15" rdf="off" dynamic_start="on" disable="member_data|trackbacks"}
    <item>
      <title>{exp:xml_encode protect_entities="yes"}{title}{/exp:xml_encode}</title>
      {categories}
      {if category_id=="5"}
          <link>{title_permalink=news/press_detail}</link>
          <guid>{title_permalink=news/press_detail}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
      {if:elseif category_id=="7"}
          <link>{title_permalink=news/event_detail}</link>
          <guid>{title_permalink=news/event_detail}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
      {/if}
      {/categories}
      <description><![CDATA[{summary}{body}]]></description>
      <dc:subject>{exp:xml_encode}{categories backspace="1"}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>
      <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
    </item>
{/exp:channel:entries}
    
    </channel>
</rss>

{/exp:rss:feed}

The issue is that the feed date:

<dc:date>2016-09-09T20:19:00+00:00</dc:date>

is not showing the date of the last entry:

<dc:date>2016-09-22T17:00:00+00:00</dc:date>

. I don’t even know where the feed date is coming.

Ian

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.