Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3100
  • Last Modified:

RSS in IE reading wrong time/date

I have created an ASP.NET page that pulls notices out of an SQL database and renders as an RSS feed. The problem is when I view the RSS feed in Internet Explorer, all pubDates are wrong but all pubDates when I view the source are correct.

Here's an example of one record...
pubDate of notice in RSS in IE: Tuesday, 8 February 2011, 2:56:09 AM [wrong]
pubDate of notice in source: Mon, 07 Feb 2011 16:26:09 PM +0000
pubDate of notice in SQL: 2011-02-07 16:26:09.000
pubDate of notice in Chrome: Mon, 07 Feb 2011 16:26:09 PM +0000

Whys is IE doing this and how can I fix it?
0
AdamBock
Asked:
AdamBock
  • 2
2 Solutions
 
wdosanjosCommented:
It seems IE is assuming your pubDate is in GMT time, and it's converting to your timezone when it displays it.  Try generating your pubDate in the format below converting you time to GMT time:

<pubDate>Mon, 07 Feb 2011 05:56:09 GMT</pubDate>
0
 
AdamBockAuthor Commented:
thanks that set me on the right track.. all works well after converting to universal time...
myDate = myDate.ToUniversalTime();

Open in new window

0
 
AdamBockAuthor Commented:
Code example added
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now