Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > RSS Feed for News shows incorrect time View modes: 
User avatar
Member
Member
andy-procaresoftware - 9/4/2012 12:48:03 PM
   
RSS Feed for News shows incorrect time
We have an RSS Link on our newsfeed. When viewing the feed it displays the time as posted 7 hours prior.

IE: We posted a news article at 9:45 am this morning. The RSS feed says it was at 2:44 am.

Thanks for any help I can get here.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 9/4/2012 12:52:07 PM
   
RE:RSS Feed for News shows incorrect time
What time does it say when you view it in the form tab? What is the time zone of your server?

User avatar
Member
Member
andy-procaresoftware - 9/4/2012 1:14:05 PM
   
RE:RSS Feed for News shows incorrect time
When I edit the news post it shows the correct time in the "Release Date" field (9/4/2012 9:45:36 AM).

The Server time is Pacific Time (GMT-8) and is set properly.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 9/4/2012 1:33:22 PM
   
RE:RSS Feed for News shows incorrect time
Does the transformation for your rss feed use UTC time or is it doing anything other than directly outputting the date? I am on my phone right now do I can't check the default transformations.

User avatar
Member
Member
andy-procaresoftware - 9/4/2012 1:48:26 PM
   
RE:RSS Feed for News shows incorrect time
Sorry - I'm not sure how I can find that.
I have opened the RSS Repeater and viewed the SecuredNewsRSSItem transformation, (code below). Time Zone set to inherit - Custom Time Zone: none.


<item>
<guid isPermaLink="true"><![CDATA[<%# GetAbsoluteUrl(GetDocumentUrl()) %>]]></guid>
<title><![CDATA[<%# Eval("NewsTitle") %>]]></title>
<description><![CDATA[<%# Eval("NewsSummary") %>]]></description>
<pubDate><%# Convert.ToDateTime(Eval("NewsReleaseDate")).ToString("r") %></pubDate>
<link><![CDATA[<%# GetAbsoluteUrl(GetDocumentUrl()) %>]]></link>
</item>

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 9/4/2012 2:17:32 PM
   
RE:RSS Feed for News shows incorrect time
See where it is doing Eval("NewsReleaseDate").ToString("r")? If you take out the "r" argument, it will output the date you see when you edit it. Google C# Datetime format strings to learn more about it.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 9/4/2012 2:27:50 PM
   
RE:RSS Feed for News shows incorrect time
Depending on your target audience, you may want to keep it as using UTC time because of time zone differences. Some rss aggregators automatically change the date to the users local time.

User avatar
Member
Member
andy-procaresoftware - 9/4/2012 6:49:15 PM
   
RE:RSS Feed for News shows incorrect time
Thank you, I was able to make that change as suggested and it worked.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 9/5/2012 2:30:38 AM
   
RE:RSS Feed for News shows incorrect time
Hello.

It is nice to see that the problem was solved so quick! Let me just link our chapter about Time zones module and all related settings, including using this module in web parts: http://devnet.kentico.com/docs/devguide/time_zones_overview.htm

Best Regards,
Radek Macalik